Class: RubyPitaya::HandlerBase
- Inherits:
-
Object
- Object
- RubyPitaya::HandlerBase
- Defined in:
- lib/rubypitaya/core/handler_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#postman ⇒ Object
readonly
Returns the value of attribute postman.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#setup ⇒ Object
readonly
Returns the value of attribute setup.
Class Method Summary collapse
- .authenticated_action_name?(action_name) ⇒ Boolean
- .non_authenticated_actions(*action_names) ⇒ Object
- .objects ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ HandlerBase
constructor
A new instance of HandlerBase.
- #set_attributes(log, services, setup, config, params, session, postman) ⇒ Object
Constructor Details
#initialize ⇒ HandlerBase
Returns a new instance of HandlerBase.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rubypitaya/core/handler_base.rb', line 12 def initialize @log = nil @services = nil @setup = nil @config = nil @params = nil @session = nil @postman = nil @objects = self.class.objects end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def config @config end |
#log ⇒ Object (readonly)
Returns the value of attribute log.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def log @log end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def objects @objects end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def params @params end |
#postman ⇒ Object (readonly)
Returns the value of attribute postman.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def postman @postman end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def services @services end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def session @session end |
#setup ⇒ Object (readonly)
Returns the value of attribute setup.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def setup @setup end |
Class Method Details
.authenticated_action_name?(action_name) ⇒ Boolean
43 44 45 |
# File 'lib/rubypitaya/core/handler_base.rb', line 43 def self.authenticated_action_name?(action_name) !self.non_authenticated_routes.include?(action_name.to_s) end |
.non_authenticated_actions(*action_names) ⇒ Object
39 40 41 |
# File 'lib/rubypitaya/core/handler_base.rb', line 39 def self.non_authenticated_actions(*action_names) self.non_authenticated_routes = action_names.map(&:to_s) end |
.objects ⇒ Object
34 35 36 37 |
# File 'lib/rubypitaya/core/handler_base.rb', line 34 def self.objects self.handler_objects ||= InstanceHolder.new return self.handler_objects end |
Instance Method Details
#set_attributes(log, services, setup, config, params, session, postman) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/rubypitaya/core/handler_base.rb', line 24 def set_attributes(log, services, setup, config, params, session, postman) @log = log @services = services @setup = setup @config = config @params = params @session = session @postman = postman end |