Class: Dolt::Sinatra::Actions
- Inherits:
-
Object
- Object
- Dolt::Sinatra::Actions
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
43
44
45
46
47
48
|
# File 'lib/dolt/sinatra/actions.rb', line 43
def method_missing(method, *args, &block)
if dolt.respond_to?(method)
return respond(dolt.send(method, *args, &block))
end
super
end
|
Instance Method Details
#lookup_ref_oid(repo, ref) ⇒ Object
35
36
37
|
# File 'lib/dolt/sinatra/actions.rb', line 35
def lookup_ref_oid(repo, ref)
dolt.lookup_ref_oid(repo, ref)
end
|
#resolve_repository(repo) ⇒ Object
31
32
33
|
# File 'lib/dolt/sinatra/actions.rb', line 31
def resolve_repository(repo)
dolt.resolve_repository(repo)
end
|
#respond_to?(method) ⇒ Boolean
39
40
41
|
# File 'lib/dolt/sinatra/actions.rb', line 39
def respond_to?(method)
dolt.respond_to?(method)
end
|