Class: Reggie
Instance Attribute Summary collapse
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(args) ⇒ Reggie
constructor
A new instance of Reggie.
- #valid? ⇒ Boolean
Methods included from CacheAccessor
Constructor Details
#initialize(args) ⇒ Reggie
Returns a new instance of Reggie.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/reggie.rb', line 11 def initialize(args) @customer_id = args[:customer_id] @token = args[:token] @base_uri = "https://api.edgecast.com/v2/mcc/customers" begin response = RestClient.get "#{@base_uri}/#{@customer_id}/compression", :authorization => @token, :accept => :json @valid = true if response.code == 200 rescue => e end end |
Instance Attribute Details
#customer_id ⇒ Object
Returns the value of attribute customer_id.
8 9 10 |
# File 'lib/reggie.rb', line 8 def customer_id @customer_id end |
#token ⇒ Object
Returns the value of attribute token.
8 9 10 |
# File 'lib/reggie.rb', line 8 def token @token end |
Instance Method Details
#valid? ⇒ Boolean
26 27 28 |
# File 'lib/reggie.rb', line 26 def valid? @valid end |