Class: RightScriptInternal
- Inherits:
-
Object
- Object
- RightScriptInternal
- Extended by:
- RightScale::Api::BaseExtend, RightScale::Api::InternalExtend
- Includes:
- RightScale::Api::Base, RightScale::Api::Internal
- Defined in:
- lib/rest_connection/rightscale/right_script_internal.rb
Overview
API 0.1
Instance Attribute Summary
Attributes included from RightScale::Api::Base
Class Method Summary collapse
Instance Method Summary collapse
- #attachments ⇒ Object
-
#clone ⇒ Object
clones a RightScript and returns the new RightScript resource that’s been created.
-
#commit(message) ⇒ Object
commits a rightscript.
- #fetch_right_script_attachments ⇒ Object
- #resource_plural_name ⇒ Object
- #resource_singular_name ⇒ Object
Methods included from RightScale::Api::BaseExtend
[], create, deny_methods, filters, find, find_all, find_by, find_by_cloud_id, find_by_id, find_by_nickname, find_by_nickname_speed, find_with_filter
Methods included from RightScale::Api::BaseConnection
Methods included from RightScale::Api::InternalConnection
Methods included from RightScale::Api::Base
#[], #[]=, #destroy, #initialize, #method_missing, #reload, #rs_id, #save
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightScale::Api::Base
Class Method Details
.resource_plural_name ⇒ Object
43 44 45 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 43 def self.resource_plural_name "right_scripts" end |
.resource_singular_name ⇒ Object
47 48 49 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 47 def self.resource_singular_name "right_script" end |
Instance Method Details
#attachments ⇒ Object
76 77 78 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 76 def @params["attachments"] ||= end |
#clone ⇒ Object
clones a RightScript and returns the new RightScript resource that’s been created.
61 62 63 64 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 61 def clone t = URI.parse(self.href) RightScript.new(:href => connection.post(t.path + "/clone")) end |
#commit(message) ⇒ Object
commits a rightscript
55 56 57 58 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 55 def commit() t = URI.parse(self.href) RightScript.new(:href => connection.post(t.path + "/commit", :commit_message => )) end |
#fetch_right_script_attachments ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 66 def t = URI.parse(self.href) @params["attachments"] = [] connection.get(t.path + "/right_script_attachments").each { |obj| obj.merge!("right_script_href" => self.href) @params["attachments"] << RightScriptAttachmentInternal.new(obj) } @params["attachments"] end |
#resource_plural_name ⇒ Object
35 36 37 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 35 def resource_plural_name "right_scripts" end |
#resource_singular_name ⇒ Object
39 40 41 |
# File 'lib/rest_connection/rightscale/right_script_internal.rb', line 39 def resource_singular_name "right_script" end |