Displaying 2 results from an estimated 2 matches for "bluewidget".
Did you mean:
blueridge
2006 Nov 04
0
traits-0.9.2 - better living through metaprogramming
...''
# we define instance traits which get their default from the class
%w( color size shape ).each{|t| trait(t){self.class.send t}}
def inspect
"color <#{ color }> size <#{ size }> shape <#{ shape }>"
end
end
class BlueWidget < AbstractWidget
color ''blue''
size 420
end
p BlueWidget::new
~ > ruby sample/j.rb
color <blue> size <420> shape <square>
<========< sample/k.rb >========>
~ > cat sample/k.rb
require ''...
2006 Nov 04
0
traits-0.10.0
...''
# we define instance traits which get their default from the class
%w( color size shape ).each{|t| trait(t){self.class.send t}}
def inspect
"color <#{ color }> size <#{ size }> shape <#{ shape }>"
end
end
class BlueWidget < AbstractWidget
color ''blue''
size 420
end
p BlueWidget::new
~ > ruby sample/j.rb
color <blue> size <420> shape <square>
<========< sample/k.rb >========>
~ > cat sample/k.rb
require ''...