class EasySerializer::Collection
Attributes
_options[R]
block[R]
name[R]
Public Class Methods
new(name, options, block)
click to toggle source
# File lib/easy_serializer/collection.rb, line 4 def initialize(name, options, block) @name = name @_options = options @block = block end
Public Instance Methods
options()
click to toggle source
# File lib/easy_serializer/collection.rb, line 10 def options received_opts.merge(collection: true) end
received_opts()
click to toggle source
# File lib/easy_serializer/collection.rb, line 18 def received_opts _options || {} end
send_method(obj)
click to toggle source
# File lib/easy_serializer/collection.rb, line 14 def send_method(obj) obj.send(name).to_a end