Class: Arke::Resource::Associations::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/arke/resource/associations/base.rb

Direct Known Subclasses

HasManyAssociation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, name, options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/arke/resource/associations/base.rb', line 8

def initialize(parent, name, options={})
  @parent  = parent
  @name    = name
  @options = options
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/arke/resource/associations/base.rb', line 6

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/arke/resource/associations/base.rb', line 6

def options
  @options
end

Instance Method Details

#targetObject



14
15
16
# File 'lib/arke/resource/associations/base.rb', line 14

def target
  klass.constantize
end