Class: ForwardCalendar::Node
- Inherits:
-
Object
- Object
- ForwardCalendar::Node
- Defined in:
- lib/forward_calendar/node.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/forward_calendar/node.rb', line 4 def to_hash hash = {} attributes = self.class.instance_variable_get(:@attributes) elements = self.class.instance_variable_get(:@elements) content = retrieve_content_tag (attributes.to_a + elements.to_a + content.to_a).each do |k, _| value = send(k) hash[k] = serialize_attribute(value) end hash end |