class Bluepine::Attributes::SchemaAttribute
Reference to other schema and doesn't accept &block.
SchemaAttribute
supports extra option named `expandable` which will either return `id` or `serialized object` as the result.
Constants
- DEFAULT_EXPANDABLE
Attributes
expandable[R]
Public Class Methods
new(name, options = {})
click to toggle source
Calls superclass method
Bluepine::Attributes::ObjectAttribute::new
# File lib/bluepine/attributes/schema_attribute.rb, line 12 def initialize(name, options = {}) # automatically add name to :of if it's not given options[:of] = name unless options.key?(:of) @expandable = options.fetch(:expandable, DEFAULT_EXPANDABLE) super end