Class: Himari::LifetimeValue

Inherits:
Struct
  • Object
show all
Defined in:
lib/himari/lifetime_value.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token

Returns:

  • (Object)

    the current value of access_token



4
5
6
# File 'lib/himari/lifetime_value.rb', line 4

def access_token
  @access_token
end

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



4
5
6
# File 'lib/himari/lifetime_value.rb', line 4

def code
  @code
end

#id_tokenObject

Returns the value of attribute id_token

Returns:

  • (Object)

    the current value of id_token



4
5
6
# File 'lib/himari/lifetime_value.rb', line 4

def id_token
  @id_token
end

#refresh_tokenObject

Returns the value of attribute refresh_token

Returns:

  • (Object)

    the current value of refresh_token



4
5
6
# File 'lib/himari/lifetime_value.rb', line 4

def refresh_token
  @refresh_token
end

Class Method Details

.from_integer(i) ⇒ Object



5
6
7
# File 'lib/himari/lifetime_value.rb', line 5

def self.from_integer(i)
  new(access_token: i, id_token: i, code: nil, refresh_token: nil)
end

Instance Method Details

#as_jsonObject



13
14
15
# File 'lib/himari/lifetime_value.rb', line 13

def as_json
  {access_token: access_token, id_token: id_token, code: code, refresh_token: refresh_token}
end

#as_logObject



9
10
11
# File 'lib/himari/lifetime_value.rb', line 9

def as_log
  as_json&.compact
end