class S3DataPacker::Sources::Object
Public Class Methods
new(object:, each_method: :each, fetch_method: :fetch, name_method: :name)
click to toggle source
# File lib/s3_data_packer/sources/object.rb, line 5 def initialize(object:, each_method: :each, fetch_method: :fetch, name_method: :name) @object = object @each_method = each_method @fetch_method = fetch_method @name_method = name_method end
Public Instance Methods
each() { |item| ... }
click to toggle source
# File lib/s3_data_packer/sources/object.rb, line 16 def each &block @object.send(@each_method) do |item| yield item end end
fetch(item)
click to toggle source
# File lib/s3_data_packer/sources/object.rb, line 22 def fetch(item) @object.send(@fetch_method, item) end
name()
click to toggle source
# File lib/s3_data_packer/sources/object.rb, line 12 def name @object.send(@name_method) end