Class: Dolt::Sinatra::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/dolt/sinatra/actions.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, lookup, renderer) ⇒ Actions

Returns a new instance of Actions.



26
27
28
29
# File 'lib/dolt/sinatra/actions.rb', line 26

def initialize(app, lookup, renderer)
  @app = app
  @dolt = Dolt::ControllerActions.new(app, lookup, renderer)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



35
36
37
38
39
40
# File 'lib/dolt/sinatra/actions.rb', line 35

def method_missing(method, *args, &block)
  if dolt.respond_to?(method)
    return respond(dolt.send(method, *args, &block))
  end
  super
end

Instance Method Details

#respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/dolt/sinatra/actions.rb', line 31

def respond_to?(method)
  dolt.respond_to?(method)
end