class Relix::Index::Accessor
Attributes
identifier[R]
Public Class Methods
new(name)
click to toggle source
# File lib/relix/index.rb, line 13 def initialize(name) @accessor = name.to_s if @accessor =~ /^(.+)\?$/ @identifier = $1 @interrogative = true else @identifier = @accessor end end
Public Instance Methods
read(object)
click to toggle source
# File lib/relix/index.rb, line 23 def read(object) result = object.send(@accessor) result = !!result if @interrogative result end