class RussianHill

Constants

DependencyTracker
VERSION

Public Class Methods

encode(*args, &block) click to toggle source

Yields a builder and automatically turns the result into a JSON string

# File lib/russian_hill.rb, line 13
def self.encode(*args, &block)
  new(*args, &block).target!
end
new(context) { |self| ... } click to toggle source
# File lib/russian_hill.rb, line 6
def initialize(context)
  @context = context
  @operations = cable_car
  yield self if ::Kernel.block_given?
end

Public Instance Methods

method_missing(symbol, *args) click to toggle source
# File lib/russian_hill.rb, line 21
def method_missing symbol, *args
  @operations = @operations.public_send(symbol, *args)
end
target!() click to toggle source
# File lib/russian_hill.rb, line 17
def target!
  @operations.dispatch.to_json
end