Class: RubyPitaya::HandlerBase

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/core/handler_base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHandlerBase

Returns a new instance of HandlerBase.



9
10
11
12
13
14
15
16
17
18
# File 'lib/rubypitaya/core/handler_base.rb', line 9

def initialize
  @bll = nil
  @log = nil
  @redis = nil
  @setup = nil
  @config = nil
  @params = nil
  @session = nil
  @postman = nil
end

Instance Attribute Details

#bllObject

Returns the value of attribute bll.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def bll
  @bll
end

#configObject

Returns the value of attribute config.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def config
  @config
end

#logObject

Returns the value of attribute log.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def log
  @log
end

#paramsObject

Returns the value of attribute params.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def params
  @params
end

#postmanObject

Returns the value of attribute postman.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def postman
  @postman
end

#redisObject

Returns the value of attribute redis.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def redis
  @redis
end

#sessionObject

Returns the value of attribute session.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def session
  @session
end

#setupObject

Returns the value of attribute setup.



7
8
9
# File 'lib/rubypitaya/core/handler_base.rb', line 7

def setup
  @setup
end

Class Method Details

.authenticated_action_name?(action_name) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/rubypitaya/core/handler_base.rb', line 24

def self.authenticated_action_name?(action_name)
  !self.non_authenticated_routes.include?(action_name.to_s)
end

.non_authenticated_actions(*action_names) ⇒ Object



20
21
22
# File 'lib/rubypitaya/core/handler_base.rb', line 20

def self.non_authenticated_actions(*action_names)
  self.non_authenticated_routes = action_names.map(&:to_s)
end