Class: Himari::Decisions::Authentication

Inherits:
Base
  • Object
show all
Defined in:
lib/himari/decisions/authentication.rb

Defined Under Namespace

Classes: Context

Instance Attribute Summary collapse

Attributes inherited from Base

#effect, #effect_comment, #effect_suggestion, #effect_user_facing_message, #rule_name

Instance Method Summary collapse

Methods inherited from Base

#allow!, allow_effects, #continue!, #decide!, #deny!, #evolve, #set_rule_name, #skip!, #to_h

Constructor Details

#initialize(refresh_info: nil) ⇒ Authentication

Returns a new instance of Authentication.



16
17
18
19
# File 'lib/himari/decisions/authentication.rb', line 16

def initialize(refresh_info: nil)
  super()
  @refresh_info = refresh_info
end

Instance Attribute Details

#refresh_infoObject

Returns the value of attribute refresh_info.



21
22
23
# File 'lib/himari/decisions/authentication.rb', line 21

def refresh_info
  @refresh_info
end

Instance Method Details

#as_logObject



27
28
29
# File 'lib/himari/decisions/authentication.rb', line 27

def as_log
  to_h.merge(refresh_info_set: !@refresh_info.nil?)
end

#to_evolve_argsObject



23
24
25
# File 'lib/himari/decisions/authentication.rb', line 23

def to_evolve_args
  {refresh_info: @refresh_info}
end