@private
@private
# File lib/aws/simple_workflow/resource.rb, line 28 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[:as] parts = [] name.to_s.split(%r_/).each_with_index do |part,n| parts << (n == 0 ? part : part.capitalize) end options[:as] = parts.join.to_sym end if options[:duration] super(name, options) do translates_output do |v| v.to_s =~ %r^\d+$/ ? v.to_i : v.downcase.to_sym end end else super(name, options, &block) end end
@private
# File lib/aws/simple_workflow/resource.rb, line 81 def self.config_attribute name, options = {}, &block attr = attribute(name, options.merge(:static => true), &block) config_attributes[attr.name] = attr end
@private
# File lib/aws/simple_workflow/resource.rb, line 64 def self.config_attributes @config_attributes ||= {} end
@private
# File lib/aws/simple_workflow/resource.rb, line 87 def self.info_attribute name, options = {} attr = attribute(name, options) info_attributes[attr.name] = attr end
@private
# File lib/aws/simple_workflow/resource.rb, line 69 def self.info_attributes @info_attributes ||= {} end
@private
# File lib/aws/simple_workflow/resource.rb, line 74 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
@private
# File lib/aws/simple_workflow/resource.rb, line 59 def self.type_attributes @type_attributes ||= {} end
@return [Boolean] Returns true if the resource exists.
# File lib/aws/simple_workflow/resource.rb, line 21 def exists? !!get_resource rescue Errors::UnknownResourceFault false end
# File lib/aws/simple_workflow/resource.rb, line 53 def get_resource attr_name = nil method = "describe_#{Core::Inflection.ruby_name(self.class.name)}" client.send(method, resource_options) end