Class: Arel::Attributes::Relation
- Inherits:
-
Attribute
- Object
- Attribute
- Arel::Attributes::Relation
- Defined in:
- lib/motor/active_record_utils/active_record_filter.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#for_write ⇒ Object
Returns the value of attribute for_write.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(relation, name, collection = false, for_write = false) ⇒ Relation
constructor
A new instance of Relation.
- #table_name ⇒ Object
Constructor Details
#initialize(relation, name, collection = false, for_write = false) ⇒ Relation
Returns a new instance of Relation.
13 14 15 16 17 18 |
# File 'lib/motor/active_record_utils/active_record_filter.rb', line 13 def initialize(relation, name, collection = false, for_write = false) self[:relation] = relation self[:name] = name @collection = collection @for_write = for_write end |
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection.
11 12 13 |
# File 'lib/motor/active_record_utils/active_record_filter.rb', line 11 def collection @collection end |
#for_write ⇒ Object
Returns the value of attribute for_write.
11 12 13 |
# File 'lib/motor/active_record_utils/active_record_filter.rb', line 11 def for_write @for_write end |
Instance Method Details
#eql?(other) ⇒ Boolean
26 27 28 29 30 31 |
# File 'lib/motor/active_record_utils/active_record_filter.rb', line 26 def eql?(other) self.class == other.class && relation == other.relation && name == other.name && collection == other.collection end |
#table_name ⇒ Object
22 23 24 |
# File 'lib/motor/active_record_utils/active_record_filter.rb', line 22 def table_name nil end |