Class: Mobility::Plugins::Arel::Attribute
- Inherits:
-
Arel::Attributes::Attribute
- Object
- Arel::Attributes::Attribute
- Mobility::Plugins::Arel::Attribute
- Includes:
- MobilityExpressions
- Defined in:
- lib/mobility/plugins/arel.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#backend_class ⇒ Object
readonly
Returns the value of attribute backend_class.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
-
#initialize(relation, column_name, locale, backend_class, attribute_name = nil) ⇒ Attribute
constructor
A new instance of Attribute.
Methods included from MobilityExpressions
Constructor Details
#initialize(relation, column_name, locale, backend_class, attribute_name = nil) ⇒ Attribute
Returns a new instance of Attribute.
48 49 50 51 52 53 |
# File 'lib/mobility/plugins/arel.rb', line 48 def initialize(relation, column_name, locale, backend_class, attribute_name = nil) @backend_class = backend_class @locale = locale @attribute_name = attribute_name || column_name super(relation, column_name) end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
46 47 48 |
# File 'lib/mobility/plugins/arel.rb', line 46 def attribute_name @attribute_name end |
#backend_class ⇒ Object (readonly)
Returns the value of attribute backend_class.
44 45 46 |
# File 'lib/mobility/plugins/arel.rb', line 44 def backend_class @backend_class end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
45 46 47 |
# File 'lib/mobility/plugins/arel.rb', line 45 def locale @locale end |