Class: Fixturex::TreeEntry
- Inherits:
-
Struct
- Object
- Struct
- Fixturex::TreeEntry
- Defined in:
- lib/fixturex/tree_entry.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
2 3 4 |
# File 'lib/fixturex/tree_entry.rb', line 2 def children @children end |
#value ⇒ Object
Returns the value of attribute value
2 3 4 |
# File 'lib/fixturex/tree_entry.rb', line 2 def value @value end |
Instance Method Details
#to_h ⇒ Object
3 4 5 6 7 8 |
# File 'lib/fixturex/tree_entry.rb', line 3 def to_h { value: value.to_h, children: children.map(&:to_h) } end |