class Recline::ModelReflection

Attributes

versions[R]

Public Class Methods

new(obj, ctx) click to toggle source
Calls superclass method
# File lib/recline/model_reflection.rb, line 8
def initialize(obj, ctx)
  super
  @versions = obj.versions if obj.respond_to? :versions
end

Public Instance Methods

get_attributes() click to toggle source
# File lib/recline/model_reflection.rb, line 13
def get_attributes
  @attributes ||= @type.fields.map { |name, field|
    # No reflection if it's not a model attribute
    property = field.property || name
    if include_property? property
      Recline::AttributeReflection.new(field, @klass, @schema)
    end
  }.compact
end