Class: RubyPitaya::HandlerBase
- Inherits:
-
Object
- Object
- RubyPitaya::HandlerBase
- Defined in:
- lib/rubypitaya/core/handler_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bll ⇒ Object
readonly
Returns the value of attribute bll.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#postman ⇒ Object
readonly
Returns the value of attribute postman.
-
#redis ⇒ Object
readonly
Returns the value of attribute redis.
-
#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
- .bll ⇒ Object
- .non_authenticated_actions(*action_names) ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ HandlerBase
constructor
A new instance of HandlerBase.
- #set_attributes(log, redis, mongo, 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 @redis = nil @setup = nil @config = nil @params = nil @session = nil @postman = nil @bll = self.class.bll end |
Instance Attribute Details
#bll ⇒ Object (readonly)
Returns the value of attribute bll.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def bll @bll end |
#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 |
#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 |
#redis ⇒ Object (readonly)
Returns the value of attribute redis.
10 11 12 |
# File 'lib/rubypitaya/core/handler_base.rb', line 10 def redis @redis 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 |
.bll ⇒ Object
35 36 37 |
# File 'lib/rubypitaya/core/handler_base.rb', line 35 def self.bll self.handler_bll ||= InstanceHolder.new 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 |
Instance Method Details
#set_attributes(log, redis, mongo, setup, config, params, session, postman) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rubypitaya/core/handler_base.rb', line 24 def set_attributes(log, redis, mongo, setup, config, params, session, postman) @log = log @redis = redis @mongo = mongo @setup = setup @config = config @params = params @session = session @postman = postman end |