Class: Deas::RouteProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/deas/route_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler_class_name) ⇒ RouteProxy

Returns a new instance of RouteProxy.



9
10
11
# File 'lib/deas/route_proxy.rb', line 9

def initialize(handler_class_name)
  @handler_class_name = handler_class_name
end

Instance Attribute Details

#handler_class_nameObject (readonly)

Returns the value of attribute handler_class_name.



7
8
9
# File 'lib/deas/route_proxy.rb', line 7

def handler_class_name
  @handler_class_name
end

Instance Method Details

#handler_classObject



13
14
15
16
17
# File 'lib/deas/route_proxy.rb', line 13

def handler_class
  constantize(@handler_class_name).tap do |handler_class|
    raise(NoHandlerClassError.new(@handler_class_name)) if !handler_class
  end
end