Module: Fog::Vcloud::Generators
- Included in:
- Real
- Defined in:
- lib/fog/vcloud/generators.rb
Instance Method Summary collapse
Instance Method Details
#basic_request(*args) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fog/vcloud/generators.rb', line 18 def basic_request(*args) self.class_eval "def \#{args[0]}(uri)\nrequest({\n:expects => \#{args[1] || 200},\n:method => '\#{args[2] || 'GET'}',\n:headers => \#{args[3] ? args[3].inspect : '{}'},\n:body => '\#{args[4] ? args[4] : ''}',\n:parse => true,\n:uri => uri })\nend\n", __FILE__,__LINE__ end |
#unauthenticated_basic_request(*args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/vcloud/generators.rb', line 5 def unauthenticated_basic_request(*args) self.class_eval "def \#{args[0]}(uri)\nunauthenticated_request({\n:expects => \#{args[1] || 200},\n:method => '\#{args[2] || 'GET'}',\n:headers => \#{args[3] ? args[3].inspect : '{}'},\n:parse => true,\n:uri => uri })\nend\n", __FILE__,__LINE__ end |