Class: Logue::IndexedElement
- Inherits:
-
EnumerableElement
- Object
- BaseElement
- Element
- EnumerableElement
- Logue::IndexedElement
- Defined in:
- lib/logue/elements/indexed_element.rb
Instance Attribute Summary
Attributes inherited from Element
Attributes inherited from BaseElement
Instance Method Summary collapse
Methods inherited from EnumerableElement
Methods inherited from Element
Methods inherited from BaseElement
#initialize, #write_line, #write_msg_object
Constructor Details
This class inherits a constructor from Logue::Element
Instance Method Details
#write_element ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/logue/elements/indexed_element.rb', line 5 def write_element if @object.respond_to? :size write_msg_object "#{@msg}.#", @object.size end @object.each_with_index do |value, index| newmsg = "#{@msg}[#{index}]" write_msg_object newmsg, value end end |