Class: Dope::ResourceEpithetingModelHandler

Inherits:
ResourceModelHandler show all
Defined in:
lib/dope/core/handler.rb

Instance Method Summary collapse

Methods inherited from ResourceModelHandler

#model, #prefix, #resources, #to_rack_output

Instance Method Details

#find_resourceObject



97
98
99
100
101
102
103
# File 'lib/dope/core/handler.rb', line 97

def find_resource
  params = ctx['derailleur.params'].dup
  params.delete(:splat)
  found = resources.find do |r|
    resource.epithet_resource_match_params?(r, params, label, prefix)
  end
end

#labelObject



89
90
91
# File 'lib/dope/core/handler.rb', line 89

def label
  object[1]
end

#resourceObject



93
94
95
# File 'lib/dope/core/handler.rb', line 93

def resource
  object[3]
end