Class: FuryDumper::Dumpers::RelationItem

Inherits:
Struct
  • Object
show all
Defined in:
lib/fury_dumper/dumpers/relation_items.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#additionalObject

Returns the value of attribute additional

Returns:

  • (Object)

    the current value of additional



5
6
7
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5

def additional
  @additional
end

#complexObject

Returns the value of attribute complex

Returns:

  • (Object)

    the current value of complex



5
6
7
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5

def complex
  @complex
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



5
6
7
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 5

def key
  @key
end

#values_for_keyObject

Returns the value of attribute values_for_key

Returns:

  • (Object)

    the current value of 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

#copyObject



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

Returns:

  • (Boolean)


10
11
12
# File 'lib/fury_dumper/dumpers/relation_items.rb', line 10

def eql?(other)
  key == other.key
end