class KeypathExpression
Public Class Methods
new(keypath)
click to toggle source
# File lib/expressions/keypath_expression.rb, line 7 def initialize(keypath) @keypath = keypath end
parse(array)
click to toggle source
# File lib/expressions/keypath_expression.rb, line 3 def self.parse(array) self.new(array[1]) end
Public Instance Methods
build_arel(arel_table)
click to toggle source
# File lib/expressions/keypath_expression.rb, line 11 def build_arel(arel_table) result = arel_table @keypath.split(".").each do |path| result = result[path] end result end
keypath()
click to toggle source
# File lib/expressions/keypath_expression.rb, line 19 def keypath @keypath end