Class: Commentatr::Client
- Inherits:
-
Object
- Object
- Commentatr::Client
- Defined in:
- lib/commentatr/client.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#page_id ⇒ Object
Returns the value of attribute page_id.
-
#partner_host ⇒ Object
Returns the value of attribute partner_host.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(params = {}) ⇒ Client
Returns a new instance of Client.
5 6 7 8 9 |
# File 'lib/commentatr/client.rb', line 5 def initialize(params = {}) %w[ client_id token partner_host page_id ].each { |param| instance_variable_set("@#{param}", params[param.to_sym]) unless params[param.to_sym].nil? } end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/commentatr/client.rb', line 3 def client_id @client_id end |
#page_id ⇒ Object
Returns the value of attribute page_id.
3 4 5 |
# File 'lib/commentatr/client.rb', line 3 def page_id @page_id end |
#partner_host ⇒ Object
Returns the value of attribute partner_host.
3 4 5 |
# File 'lib/commentatr/client.rb', line 3 def partner_host @partner_host end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/commentatr/client.rb', line 3 def token @token end |