Class: HexWrench::RelationFeature

Inherits:
Feature
  • Object
show all
Defined in:
lib/hexwrench/core/feature.rb

Instance Attribute Summary collapse

Attributes inherited from Feature

#resource, #sym

Instance Method Summary collapse

Methods inherited from Feature

for, #initialize, mapping

Constructor Details

This class inherits a constructor from HexWrench::Feature

Instance Attribute Details



64
65
66
# File 'lib/hexwrench/core/feature.rb', line 64

def related_model
  @related_model || related_model_from_relationship_klass
end

Returns the value of attribute related_perspective.



68
69
70
# File 'lib/hexwrench/core/feature.rb', line 68

def related_perspective
  @related_perspective
end

Instance Method Details



58
59
60
# File 'lib/hexwrench/core/feature.rb', line 58

def related_model_from_relationship_klass
  Kernel.const_get relationship.klass
end

#relationshipObject



54
55
56
# File 'lib/hexwrench/core/feature.rb', line 54

def relationship
  resource.relationship(sym)
end