Class: Objectify::Config::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/objectify/config/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(routing_opts, resource_name, name, options, default_policies, route_factory = Route) ⇒ Action

Returns a new instance of Action.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/objectify/config/action.rb', line 10

def initialize(routing_opts,
               resource_name, name, options, default_policies,
               route_factory = Route)
  @route = route_factory.new(routing_opts)
  @resource_name = resource_name
  @name = name
  @policies = default_policies.merge(options, options[name])
  @namespace = options[:namespace] || resource_name

  if options[name]
    @service = options[name][:service]
    @responder = options[name][:responder]
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def name
  @name
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def namespace
  @namespace
end

#policiesObject (readonly)

Returns the value of attribute policies.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def policies
  @policies
end

#resource_nameObject (readonly)

Returns the value of attribute resource_name.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def resource_name
  @resource_name
end

#responderObject (readonly)

Returns the value of attribute responder.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def responder
  @responder
end

#routeObject (readonly)

Returns the value of attribute route.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def route
  @route
end

#serviceObject (readonly)

Returns the value of attribute service.



7
8
9
# File 'lib/objectify/config/action.rb', line 7

def service
  @service
end