Class: Arrest::BelongsToAttribute
- Defined in:
- lib/arrest/attributes/belongs_to_attribute.rb
Instance Attribute Summary collapse
-
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
Attributes inherited from Attribute
#actions, #clazz, #dirty, #json_name, #name
Instance Method Summary collapse
-
#initialize(name, actions, field_class, foreign_key, target_class_name) ⇒ BelongsToAttribute
constructor
A new instance of BelongsToAttribute.
- #target_class ⇒ Object
Methods inherited from Attribute
#dirty?, #from_hash, #mutable?, #read_only?, #to_hash
Constructor Details
#initialize(name, actions, field_class, foreign_key, target_class_name) ⇒ BelongsToAttribute
Returns a new instance of BelongsToAttribute.
4 5 6 7 8 |
# File 'lib/arrest/attributes/belongs_to_attribute.rb', line 4 def initialize(name, actions, field_class, foreign_key, target_class_name) super(name, field_class, actions) @foreign_key = foreign_key @target_class_name = target_class_name end |
Instance Attribute Details
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
3 4 5 |
# File 'lib/arrest/attributes/belongs_to_attribute.rb', line 3 def foreign_key @foreign_key end |