Class | Rabl::Builder |
In: |
lib/rabl/builder.rb
|
Parent: | Object |
SETTING_TYPES | = | { :attributes => :name, :node => :name, :child => :data, :glue => :data, :extends => :file |
Constructs a new rabl hash based on given object and options options = { :format => "json", :root => true, :child_root => true,
:attributes, :node, :child, :glue, :extends }
Extends an existing rabl template with additional attributes in the block extends("users/show") { attribute :full_name }
resolve_condition(:if => true) => true resolve_condition(:if => ‘Im truthy’) => true resolve_condition(:if => lambda { |m| false }) => false resolve_condition(:unless => lambda { |m| false }) => true resolve_condition(:unless => lambda { |m| false }, :if => proc { true}) => true