Class: Ykutils::StructuredTextForSimple::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/ykutils/stext.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentsObject (readonly)

Returns the value of attribute contents.



292
293
294
# File 'lib/ykutils/stext.rb', line 292

def contents
  @contents
end

#nameObject (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