Class: Attribute
- Inherits:
-
Object
- Object
- Attribute
- Defined in:
- lib/lurry/attribute.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #block_given? ⇒ Boolean
-
#initialize(name, block) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(name, block) ⇒ Attribute
Returns a new instance of Attribute.
2 3 4 5 |
# File 'lib/lurry/attribute.rb', line 2 def initialize(name, block) @name = name @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
7 8 9 |
# File 'lib/lurry/attribute.rb', line 7 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/lurry/attribute.rb', line 7 def name @name end |
Instance Method Details
#block_given? ⇒ Boolean
9 10 11 |
# File 'lib/lurry/attribute.rb', line 9 def block_given? !@block.nil? end |