Class: Diagnostics::DataGroup
Instance Method Summary collapse
- #<<(object) ⇒ Object
- #[]=(key, value) ⇒ Object
- #attributes(format = nil) ⇒ Object
- #elements ⇒ Object
- #lists(format = nil) ⇒ Object
- #tables(format = nil) ⇒ Object
- #texts(format = nil) ⇒ Object
Instance Method Details
#<<(object) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/diagnostics/data_group.rb', line 28 def <<(object) case object when Array then lists << Data::List.new(object) when String then texts << Data::Text.new(object) when Hash then tables << Data::Table.new(object) end end |
#[]=(key, value) ⇒ Object
24 25 26 |
# File 'lib/diagnostics/data_group.rb', line 24 def []=(key, value) attributes << Data::Attribute.new(key, value) end |
#attributes(format = nil) ⇒ Object
8 9 10 |
# File 'lib/diagnostics/data_group.rb', line 8 def attributes(format = nil) elements.attributes(format) end |
#elements ⇒ Object
4 5 6 |
# File 'lib/diagnostics/data_group.rb', line 4 def elements @elements ||= Data::Elements.new end |
#lists(format = nil) ⇒ Object
12 13 14 |
# File 'lib/diagnostics/data_group.rb', line 12 def lists(format = nil) elements.lists(format) end |
#tables(format = nil) ⇒ Object
20 21 22 |
# File 'lib/diagnostics/data_group.rb', line 20 def tables(format = nil) elements.tables(format) end |
#texts(format = nil) ⇒ Object
16 17 18 |
# File 'lib/diagnostics/data_group.rb', line 16 def texts(format = nil) elements.texts(format) end |