class Representable::Binding::Map
Public Instance Methods
<<(binding)
click to toggle source
TODO: Merge with Definitions.
Calls superclass method
# File lib/representable/binding.rb, line 19 def <<(binding) # can be slow. this is compile time code. (existing = find { |bin| bin.name == binding.name }) ? self[index(existing)] = binding : super(binding) end
call(method, options)
click to toggle source
# File lib/representable/binding.rb, line 11 def call(method, options) each do |bin| options[:binding] = bin # this is so much faster than options.merge(). bin.send(method, options) end end