Class: VirtualCollection::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/e_plat/mapping/virtual_collection/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource:, map_from:) ⇒ Base

useful for adding an interface that gets and sets from nested attributes accross nested resources for example a order.line_items collection that is aliased to attributes in both order.consignments.shipping and order.consignments.shipping.line_items



9
10
# File 'lib/e_plat/mapping/virtual_collection/base.rb', line 9

def initialize(resource:, map_from:)
end

Instance Attribute Details

#resourceObject

Returns the value of attribute resource.



5
6
7
# File 'lib/e_plat/mapping/virtual_collection/base.rb', line 5

def resource
  @resource
end