Class: FuryDumper::Dumpers::RelationItem
- Inherits:
-
Struct
- Object
- Struct
- FuryDumper::Dumpers::RelationItem
- Defined in:
- lib/fury_dumper/dumpers/relation_items.rb
Instance Attribute Summary collapse
-
#additional ⇒ Object
Returns the value of attribute additional.
-
#complex ⇒ Object
Returns the value of attribute complex.
-
#key ⇒ Object
Returns the value of attribute key.
-
#values_for_key ⇒ Object
Returns the value of attribute values_for_key.
Instance Method Summary collapse
- #copy ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(key:, values_for_key:, complex: false, additional: false) ⇒ RelationItem
constructor
A new instance of RelationItem.
Constructor Details
#initialize(key:, values_for_key:, complex: false, additional: false) ⇒ RelationItem
Returns a new instance of RelationItem.
6 7 8 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 6 def initialize(key:, values_for_key:, complex: false, additional: false) super(key, values_for_key, complex, additional) end |
Instance Attribute Details
#additional ⇒ Object
Returns the value of attribute additional
5 6 7 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5 def additional @additional end |
#complex ⇒ Object
Returns the value of attribute complex
5 6 7 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5 def complex @complex end |
#key ⇒ Object
Returns the value of attribute key
5 6 7 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5 def key @key end |
#values_for_key ⇒ Object
Returns the value of attribute values_for_key
5 6 7 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5 def values_for_key @values_for_key end |
Instance Method Details
#copy ⇒ Object
14 15 16 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 14 def copy self.class.new(key: key, values_for_key: values_for_key.dup, complex: complex, additional: additional) end |
#eql?(other) ⇒ Boolean
10 11 12 |
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 10 def eql?(other) key == other.key end |