Class: AttrSearchableGrammar::Attributes::Base
- Inherits:
-
Object
- Object
- AttrSearchableGrammar::Attributes::Base
show all
- Defined in:
- lib/attr_searchable_grammar/attributes.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(attribute, klass, options = {}) ⇒ Base
Returns a new instance of Base.
82
83
84
85
86
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 82
def initialize(attribute, klass, options = {})
@attribute = attribute
@klass = klass
@options = (options || {})
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
112
113
114
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 112
def method_missing(name, *args, &block)
@attribute.send name, *args, &block
end
|
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
80
81
82
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 80
def attribute
@attribute
end
|
#options ⇒ Object
Returns the value of attribute options.
80
81
82
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 80
def options
@options
end
|
Instance Method Details
100
101
102
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 100
def fulltext?
false
end
|
#map(value) ⇒ Object
88
89
90
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 88
def map(value)
value
end
|
#respond_to?(*args) ⇒ Boolean
116
117
118
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 116
def respond_to?(*args)
@attribute.respond_to? *args
end
|