Class: Qingcloud::Api::Base

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/qingcloud/api/base.rb

Direct Known Subclasses

Iaas

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options={}, now=nil)
  @client = client
  @action = action 
  @options = options
  @now = now || Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



8
9
10
# File 'lib/qingcloud/api/base.rb', line 8

def action
  @action
end

#clientObject

Returns the value of attribute client.



8
9
10
# File 'lib/qingcloud/api/base.rb', line 8

def client
  @client
end

#nowObject

Returns the value of attribute now.



8
9
10
# File 'lib/qingcloud/api/base.rb', line 8

def now
  @now
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/qingcloud/api/base.rb', line 8

def options
  @options
end