Class: ActiveRecord::Searchable::Field

Inherits:
Data
  • Object
show all
Defined in:
lib/activerecord/searchable/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • the current value of name



5
6
7
# File 'lib/activerecord/searchable/field.rb', line 5

def name
  @name
end

#viaObject (readonly)

Returns the value of attribute via

Returns:

  • the current value of via



5
6
7
# File 'lib/activerecord/searchable/field.rb', line 5

def via
  @via
end

#weightObject (readonly)

Returns the value of attribute weight

Returns:

  • the current value of weight



5
6
7
# File 'lib/activerecord/searchable/field.rb', line 5

def weight
  @weight
end