Class: ActiveRecord::Searchable::Field
- Inherits:
-
Data
- Object
- Data
- ActiveRecord::Searchable::Field
- Defined in:
- lib/activerecord/searchable/field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#via ⇒ Object
readonly
Returns the value of attribute via.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
-
#initialize(name:, weight: 1.0, via: nil) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(name:, weight: 1.0, via: nil) ⇒ Field
Returns a new instance of Field.
6 7 8 |
# File 'lib/activerecord/searchable/field.rb', line 6 def initialize(name:, weight: 1.0, via: nil) super(name: name, weight: weight, via: via) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
5 6 7 |
# File 'lib/activerecord/searchable/field.rb', line 5 def name @name end |
#via ⇒ Object (readonly)
Returns the value of attribute via
5 6 7 |
# File 'lib/activerecord/searchable/field.rb', line 5 def via @via end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight
5 6 7 |
# File 'lib/activerecord/searchable/field.rb', line 5 def weight @weight end |