module Dummy::Serializer::Attributes
Constants
- DEFAULT_RESOLVER
Public Instance Methods
attribute(name, resolver = nil, &block)
click to toggle source
# File lib/dummy/serializer/attributes.rb, line 6 def attribute(name, resolver = nil, &block) attributes[name] = resolver || block || DEFAULT_RESOLVER.curry[name] end
attributes()
click to toggle source
# File lib/dummy/serializer/attributes.rb, line 10 def attributes @attributes ||= {} end