Class: Lolita::Processors::RequestProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/lolita/processors/request_processor.rb

Direct Known Subclasses

IndexActionProcessor

Defined Under Namespace

Classes: IndexActionProcessor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mapping, scope) ⇒ RequestProcessor

Returns a new instance of RequestProcessor.



12
13
14
15
# File 'lib/lolita/processors/request_processor.rb', line 12

def initialize(mapping,scope)
  @mapping = mapping
  @scope = scope
end

Instance Attribute Details

#scopeObject

Returns the value of attribute scope.



5
6
7
# File 'lib/lolita/processors/request_processor.rb', line 5

def scope
  @scope
end

Class Method Details

.respond_to(mapping, scope, action) ⇒ Object



7
8
9
10
# File 'lib/lolita/processors/request_processor.rb', line 7

def self.respond_to(mapping,scope,action) 
  action_processor = "Lolita::Processors::RequestProcessor::#{action.to_s.camelize}ActionProcessor".constantize.new(mapping,scope)
  action_processor.respond
end

Instance Method Details

#resource_classObject



17
18
19
# File 'lib/lolita/processors/request_processor.rb', line 17

def resource_class
  @scope.resource_class
end