Parent

ActiveResource::Reflection::AssociationReflection

Attributes

macro[R]

Returns the macro type.

has_many :clients returns :has_many

name[R]

Returns the name of the macro.

has_many :clients returns :clients

options[R]

Returns the hash of options used for the macro.

has_many :clients returns +{}+

Public Class Methods

new(macro, name, options) click to toggle source
# File lib/active_resource/reflection.rb, line 39
def initialize(macro, name, options)
  @macro, @name, @options = macro, name, options
end

Public Instance Methods

class_name() click to toggle source

Returns the class name for the macro.

has_many :clients returns 'Client'

# File lib/active_resource/reflection.rb, line 68
def class_name
  @class_name ||= derive_class_name
end
klass() click to toggle source

Returns the class for the macro.

has_many :clients returns the Client class

# File lib/active_resource/reflection.rb, line 61
def klass
  @klass ||= class_name.constantize
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.