Class: Qingcloud::Api::Base
- Inherits:
-
Object
- Object
- Qingcloud::Api::Base
- Includes:
- HTTParty
- Defined in:
- lib/qingcloud/api/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#client ⇒ Object
Returns the value of attribute client.
-
#now ⇒ Object
Returns the value of attribute now.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(client, action, options = {}, now = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(client, action, options = {}, now = nil) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 |
# File 'lib/qingcloud/api/base.rb', line 10 def initialize(client, action, ={}, now=nil) @client = client @action = action @options = @now = now || Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ') end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
8 9 10 |
# File 'lib/qingcloud/api/base.rb', line 8 def action @action end |
#client ⇒ Object
Returns the value of attribute client.
8 9 10 |
# File 'lib/qingcloud/api/base.rb', line 8 def client @client end |
#now ⇒ Object
Returns the value of attribute now.
8 9 10 |
# File 'lib/qingcloud/api/base.rb', line 8 def now @now end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/qingcloud/api/base.rb', line 8 def @options end |