Class: Mobility::Plugins::Arel::Attribute

Inherits:
Arel::Attributes::Attribute
  • Object
show all
Includes:
MobilityExpressions
Defined in:
lib/mobility/plugins/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.



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_nameObject (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_classObject (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

#localeObject (readonly)

Returns the value of attribute locale.



45
46
47
# File 'lib/mobility/plugins/arel.rb', line 45

def locale
  @locale
end