Class: Mobility::Arel::Attribute

Inherits:
Arel::Attributes::Attribute
  • Object
show all
Includes:
MobilityExpressions
Defined in:
lib/mobility/arel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MobilityExpressions

#as

Constructor Details

#initialize(relation, column_name, locale, backend_class, attribute_name: nil) ⇒ Attribute

Returns a new instance of Attribute.


41
42
43
44
45
46
# File 'lib/mobility/arel.rb', line 41

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_nameObject (readonly)

Returns the value of attribute attribute_name


39
40
41
# File 'lib/mobility/arel.rb', line 39

def attribute_name
  @attribute_name
end

#backend_classObject (readonly)

Returns the value of attribute backend_class


37
38
39
# File 'lib/mobility/arel.rb', line 37

def backend_class
  @backend_class
end

#localeObject (readonly)

Returns the value of attribute locale


38
39
40
# File 'lib/mobility/arel.rb', line 38

def locale
  @locale
end