Class: Ferret::FieldSymbol

Inherits:
BlankSlate show all
Includes:
FieldSymbolMethods
Defined in:
lib/ferret/field_symbol.rb

Overview

See FieldSymbolMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FieldSymbolMethods

#desc, #desc?, #type

Constructor Details

#initialize(symbol, desc = false) ⇒ FieldSymbol

Returns a new instance of FieldSymbol.



78
79
80
81
# File 'lib/ferret/field_symbol.rb', line 78

def initialize(symbol, desc = false)
  @symbol = symbol
  @desc = desc
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



83
84
85
# File 'lib/ferret/field_symbol.rb', line 83

def method_missing(method, *args)
  @symbol.__send__(method, *args)
end

Instance Attribute Details

#desc=(value) ⇒ Object (writeonly)

Sets the attribute desc

Parameters:

  • value

    the value to set the attribute desc to.



87
88
89
# File 'lib/ferret/field_symbol.rb', line 87

def desc=(value)
  @desc = value
end

#type=(value) ⇒ Object (writeonly)

Sets the attribute type

Parameters:

  • value

    the value to set the attribute type to.



87
88
89
# File 'lib/ferret/field_symbol.rb', line 87

def type=(value)
  @type = value
end