Class: Executable
- Inherits:
-
Object
- Object
- Executable
- Extended by:
- RightScale::Api::BaseExtend
- Includes:
- RightScale::Api::Base
- Defined in:
- lib/rest_connection/rightscale/executable.rb
Overview
API 1.0
Instance Attribute Summary
Attributes included from RightScale::Api::Base
Instance Method Summary collapse
- #href ⇒ Object
- #name ⇒ Object
-
#recipe? ⇒ Boolean
executable can be EITHER a right_script or recipe executable example params format: can have recipes AND right_scripts.
- #right_script ⇒ Object
- #right_script? ⇒ Boolean
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, resource_plural_name, resource_singular_name
Methods included from RightScale::Api::BaseConnection
Methods included from RightScale::Api::Base
#[], #[]=, #destroy, #initialize, #method_missing, #reload, #resource_plural_name, #resource_singular_name, #rs_id, #save
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightScale::Api::Base
Instance Method Details
#href ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/rest_connection/rightscale/executable.rb', line 67 def href if right_script? return right_script.href else #recipes do not have hrefs, only names return recipe end end |
#name ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/rest_connection/rightscale/executable.rb', line 59 def name if right_script? return right_script.name else return recipe end end |
#recipe? ⇒ Boolean
executable can be EITHER a right_script or recipe executable example params format: can have recipes AND right_scripts
45 46 47 48 49 50 |
# File 'lib/rest_connection/rightscale/executable.rb', line 45 def recipe? if self["recipe"] == nil # && right_script['href'] return false end true end |
#right_script ⇒ Object
76 77 78 |
# File 'lib/rest_connection/rightscale/executable.rb', line 76 def right_script RightScript.new(@params['right_script']) end |
#right_script? ⇒ Boolean
52 53 54 55 56 57 |
# File 'lib/rest_connection/rightscale/executable.rb', line 52 def right_script? if self["recipe"] == nil # && right_script['href'] return true end false end |