Class: Ykutils::StructuredTextForSimple::Item
- Inherits:
-
Object
- Object
- Ykutils::StructuredTextForSimple::Item
- Defined in:
- lib/ykutils/stext.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add(content) ⇒ Object
-
#initialize(name) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(name) ⇒ Item
Returns a new instance of Item.
294 295 296 297 |
# File 'lib/ykutils/stext.rb', line 294 def initialize(name) @name = name @contents = [] end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
292 293 294 |
# File 'lib/ykutils/stext.rb', line 292 def contents @contents end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
292 293 294 |
# File 'lib/ykutils/stext.rb', line 292 def name @name end |
Instance Method Details
#add(content) ⇒ Object
299 300 301 |
# File 'lib/ykutils/stext.rb', line 299 def add(content) @contents << content end |