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.
71
72
73
74
75
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 71
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
101
102
103
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 101
def method_missing(name, *args, &block)
@attribute.send name, *args, &block
end
|
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
69
70
71
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 69
def attribute
@attribute
end
|
#options ⇒ Object
Returns the value of attribute options.
69
70
71
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 69
def options
@options
end
|
Instance Method Details
89
90
91
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 89
def fulltext?
false
end
|
#map(value) ⇒ Object
77
78
79
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 77
def map(value)
value
end
|
#respond_to?(*args) ⇒ Boolean
105
106
107
|
# File 'lib/attr_searchable_grammar/attributes.rb', line 105
def respond_to?(*args)
@attribute.respond_to? *args
end
|