Class: Dope::ResourceModelHandler

Inherits:
Derailleur::Handler
  • Object
show all
Defined in:
lib/dope/core/handler.rb

Instance Method Summary collapse

Instance Method Details

#modelObject



57
58
59
# File 'lib/dope/core/handler.rb', line 57

def model
  object[0]
end

#prefixObject



65
66
67
# File 'lib/dope/core/handler.rb', line 65

def prefix
  ":#{model.base_path}."
end

#resourcesObject



61
62
63
# File 'lib/dope/core/handler.rb', line 61

def resources
  object[2]
end

#to_rack_outputObject

Raises:



69
70
71
72
73
# File 'lib/dope/core/handler.rb', line 69

def to_rack_output
  resource = find_resource
  raise ResourceNotFound unless resource
  ResourceHandler.new(resource, env, ctx).to_rack_output
end