class AWS::SimpleWorkflow::Resource
@api private
def self.attribute name, options = {}, &block
- Api: - private
def self.attribute name, options = {}, &block # the simple workflow attributes are all given as 'lowerCamelCase' # this converts the :snake_case name to the correct format unless options[:from] parts = [] name.to_s.split(/_/).each_with_index do |part,n| parts << (n == 0 ? part : part.capitalize) end options[:from] = parts.join.to_sym end if options[:duration] super(name, options) do translates_output do |v| v.to_s =~ /^\d+$/ ? v.to_i : v.downcase.to_sym end end else super(name, options, &block) end end
def self.config_attribute name, options = {}, &block
- Api: - private
def self.config_attribute name, options = {}, &block attr = attribute(name, options.merge(:static => true), &block) config_attributes[attr.name] = attr end
def self.config_attributes
- Api: - private
def self.config_attributes @config_attributes ||= {} end
def self.info_attribute name, options = {}
- Api: - private
def self.info_attribute name, options = {} attr = attribute(name, options) info_attributes[attr.name] = attr end
def self.info_attributes
- Api: - private
def self.info_attributes @info_attributes ||= {} end
def self.type_attribute name, options = {}, &block
- Api: - private
def self.type_attribute name, options = {}, &block options[:static] = true unless options.has_key?(:static) attr = attribute(name, options, &block) type_attributes[attr.name] = attr end
def self.type_attributes
- Api: - private
def self.type_attributes @type_attributes ||= {} end
def exists?
-
(Boolean)
- Returns true if the resource exists.
def exists? !!get_resource rescue Errors::UnknownResourceFault false end
def get_resource attr_name = nil
def get_resource attr_name = nil method = "describe_#{Core::Inflection.ruby_name(self.class.name)}" client.send(method, resource_options) end