class Executable

API 1.0

Public Instance Methods

href() click to toggle source
# 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() click to toggle source
# File lib/rest_connection/rightscale/executable.rb, line 59
def name
  if right_script?
    return right_script.name
  else
    return recipe
  end
end
recipe?() click to toggle source

executable can be EITHER a right_script or recipe executable example params format: can have recipes AND right_scripts @params =

{ :recipe =>
  :position => 12,
  :apply => "operational",
  :right_script => { "href" => "http://blah",
                     "name" => "blah"
                     ...
  }
# 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() click to toggle source
# File lib/rest_connection/rightscale/executable.rb, line 76
def right_script
  RightScript.new(@params['right_script'])
end
right_script?() click to toggle source
# File lib/rest_connection/rightscale/executable.rb, line 52
def right_script?
  if self["recipe"] == nil # && right_script['href']
    return true
  end
  false
end