Class: Kamigo::LineAccount
- Inherits:
-
Object
- Object
- Kamigo::LineAccount
- Defined in:
- lib/kamigo/line_account.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
Returns the value of attribute channel_id.
-
#channel_secret ⇒ Object
Returns the value of attribute channel_secret.
-
#channel_token ⇒ Object
Returns the value of attribute channel_token.
-
#default_http_method ⇒ Object
Returns the value of attribute default_http_method.
-
#default_path ⇒ Object
Returns the value of attribute default_path.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize(name) ⇒ LineAccount
constructor
A new instance of LineAccount.
- #reset_client ⇒ Object
Constructor Details
#initialize(name) ⇒ LineAccount
Returns a new instance of LineAccount.
6 7 8 |
# File 'lib/kamigo/line_account.rb', line 6 def initialize(name) @name = name.to_s end |
Instance Attribute Details
#channel_id ⇒ Object
Returns the value of attribute channel_id.
3 4 5 |
# File 'lib/kamigo/line_account.rb', line 3 def channel_id @channel_id end |
#channel_secret ⇒ Object
Returns the value of attribute channel_secret.
3 4 5 |
# File 'lib/kamigo/line_account.rb', line 3 def channel_secret @channel_secret end |
#channel_token ⇒ Object
Returns the value of attribute channel_token.
3 4 5 |
# File 'lib/kamigo/line_account.rb', line 3 def channel_token @channel_token end |
#default_http_method ⇒ Object
Returns the value of attribute default_http_method.
4 5 6 |
# File 'lib/kamigo/line_account.rb', line 4 def default_http_method @default_http_method end |
#default_path ⇒ Object
Returns the value of attribute default_path.
4 5 6 |
# File 'lib/kamigo/line_account.rb', line 4 def default_path @default_path end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/kamigo/line_account.rb', line 3 def name @name end |
Instance Method Details
#client ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/kamigo/line_account.rb', line 10 def client @client ||= Line::Bot::Client.new do |config| config.channel_id = channel_id config.channel_secret = channel_secret config.channel_token = channel_token end end |
#reset_client ⇒ Object
18 19 20 |
# File 'lib/kamigo/line_account.rb', line 18 def reset_client @client = nil end |