Class: Wardrobe::SetterGetter
- Inherits:
-
Object
- Object
- Wardrobe::SetterGetter
- Defined in:
- lib/wardrobe/getter_setter.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#use_if ⇒ Object
readonly
Returns the value of attribute use_if.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(name, priority, block, use_if) ⇒ SetterGetter
constructor
A new instance of SetterGetter.
Constructor Details
#initialize(name, priority, block, use_if) ⇒ SetterGetter
Returns a new instance of SetterGetter.
11 12 13 14 15 16 |
# File 'lib/wardrobe/getter_setter.rb', line 11 def initialize(name, priority, block, use_if) @name = name @priority = priority @block = block @use_if = use_if end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
9 10 11 |
# File 'lib/wardrobe/getter_setter.rb', line 9 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/wardrobe/getter_setter.rb', line 9 def name @name end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
9 10 11 |
# File 'lib/wardrobe/getter_setter.rb', line 9 def priority @priority end |
#use_if ⇒ Object (readonly)
Returns the value of attribute use_if.
9 10 11 |
# File 'lib/wardrobe/getter_setter.rb', line 9 def use_if @use_if end |
Instance Method Details
#<=>(other) ⇒ Object
18 19 20 |
# File 'lib/wardrobe/getter_setter.rb', line 18 def <=>(other) priority <=> other.priority end |