class AttrSearchableGrammar::Attributes::Base

Attributes

attribute[R]
options[R]

Public Class Methods

new(attribute, klass, options = {}) click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 82
def initialize(attribute, klass, options = {})
  @attribute = attribute
  @klass = klass
  @options = (options || {})
end

Public Instance Methods

compatible?(value) click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 92
def compatible?(value)
  map value

  true
rescue AttrSearchable::IncompatibleDatatype
  false
end
fulltext?() click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 100
def fulltext?
  false
end
map(value) click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 88
def map(value)
  value
end
method_missing(name, *args, &block) click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 112
def method_missing(name, *args, &block)
  @attribute.send name, *args, &block
end
respond_to?(*args) click to toggle source
# File lib/attr_searchable_grammar/attributes.rb, line 116
def respond_to?(*args)
  @attribute.respond_to? *args
end