class Jumunge::Jumunge

Public Class Methods

new(object, path) click to toggle source
# File lib/jumunge.rb, line 135
def initialize(object, path)
  @object = object
  @trail, *@trails = path.split '.'
  @is_array = @trail[-2..-1] == '[]'
  @is_value = @trail[-1] == '!'
  @is_opt = @trail[-1] == '?'
  @performer = performer_class.new @object, @trail, @trails
end

Public Instance Methods

perform() click to toggle source
# File lib/jumunge.rb, line 144
def perform
  @performer.perform
end

Private Instance Methods

performer_class() click to toggle source
# File lib/jumunge.rb, line 150
def performer_class
  if @object
    if @is_array
      JuArray
    elsif @is_value
      JuValue
    elsif @is_opt
      JuOpt
    else
      JuOther
    end
  else
    JuThru
  end
end