module HalApi::Representer::FormatKeys::ClassMethods
Public Instance Methods
collection(name, options={})
click to toggle source
Calls superclass method
# File lib/hal_api/representer/format_keys.rb, line 22 def collection(name, options={}) n = (options[:as] || name).to_s options[:as] = options[:embedded] ? n.dasherize : n.camelize(:lower) super(name, options) end
link(options, &block)
click to toggle source
Calls superclass method
# File lib/hal_api/representer/format_keys.rb, line 10 def link(options, &block) options = {:rel => options} unless options.is_a?(Hash) options[:rel] = options[:rel].to_s.dasherize super(options, &block) end
property(name, options={})
click to toggle source
Calls superclass method
# File lib/hal_api/representer/format_keys.rb, line 16 def property(name, options={}) n = (options[:as] || name).to_s options[:as] = options[:embedded] ? n.dasherize : n.camelize(:lower) super(name, options) end