Class: Commentatr::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/commentatr/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject

Returns the value of attribute client_id.



3
4
5
# File 'lib/commentatr/client.rb', line 3

def client_id
  @client_id
end

#page_idObject

Returns the value of attribute page_id.



3
4
5
# File 'lib/commentatr/client.rb', line 3

def page_id
  @page_id
end

#partner_hostObject

Returns the value of attribute partner_host.



3
4
5
# File 'lib/commentatr/client.rb', line 3

def partner_host
  @partner_host
end

#tokenObject

Returns the value of attribute token.



3
4
5
# File 'lib/commentatr/client.rb', line 3

def token
  @token
end