Class: Arrest::HasManyAttribute
- Defined in:
- lib/arrest/attributes/has_many_attribute.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#clazz_name ⇒ Object
readonly
Returns the value of attribute clazz_name.
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#url_part ⇒ Object
readonly
Returns the value of attribute url_part.
Attributes inherited from Attribute
#clazz, #json_name, #name, #read_only
Instance Method Summary collapse
-
#initialize(ids_field_name, method_name, clazz_name, url_part, foreign_key, read_only = false) ⇒ HasManyAttribute
constructor
A new instance of HasManyAttribute.
Methods inherited from Attribute
Constructor Details
#initialize(ids_field_name, method_name, clazz_name, url_part, foreign_key, read_only = false) ⇒ HasManyAttribute
Returns a new instance of HasManyAttribute.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/arrest/attributes/has_many_attribute.rb', line 5 def initialize(ids_field_name, method_name, clazz_name, url_part, foreign_key, read_only = false) super(ids_field_name, read_only, Array) @method_name = method_name.to_sym @clazz_name = clazz_name.to_sym @url_part = url_part.to_sym @foreign_key = foreign_key.to_sym end |
Instance Attribute Details
#clazz_name ⇒ Object (readonly)
Returns the value of attribute clazz_name.
4 5 6 |
# File 'lib/arrest/attributes/has_many_attribute.rb', line 4 def clazz_name @clazz_name end |
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
4 5 6 |
# File 'lib/arrest/attributes/has_many_attribute.rb', line 4 def foreign_key @foreign_key end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
4 5 6 |
# File 'lib/arrest/attributes/has_many_attribute.rb', line 4 def method_name @method_name end |
#url_part ⇒ Object (readonly)
Returns the value of attribute url_part.
4 5 6 |
# File 'lib/arrest/attributes/has_many_attribute.rb', line 4 def url_part @url_part end |