Class: Lipa::Kind
- Inherits:
-
Object
- Object
- Lipa::Kind
- Defined in:
- lib/lipa/kind.rb
Overview
Implemenation of kind(template) for description
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#for ⇒ Object
readonly
Returns the value of attribute for.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, attrs = {}, &block) ⇒ Kind
constructor
A new instance of Kind.
Constructor Details
#initialize(name, attrs = {}, &block) ⇒ Kind
Returns a new instance of Kind.
42 43 44 45 46 47 48 49 |
# File 'lib/lipa/kind.rb', line 42 def initialize(name, attrs = {}, &block) @for = attrs.delete(:for) @for ||= :node @attrs = attrs @name = name.to_sym @block = block if block_given? end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
41 42 43 |
# File 'lib/lipa/kind.rb', line 41 def attrs @attrs end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
41 42 43 |
# File 'lib/lipa/kind.rb', line 41 def block @block end |
#for ⇒ Object (readonly)
Returns the value of attribute for.
41 42 43 |
# File 'lib/lipa/kind.rb', line 41 def for @for end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41 42 43 |
# File 'lib/lipa/kind.rb', line 41 def name @name end |