Class AWS::SimpleWorkflow::HistoryEvent::Attributes
In: lib/aws/simple_workflow/history_event.rb
Parent: Object

A collection off attributes that provides method and hash style access to a collection of attributes.

If you are exploring a history event, you can call {keys} to get a complete list of attribute names present. You can also reference the service API documentation that lists all history event types along with their returned attributes.

Indifferent Access

Here are a few examples showing the different ways to access an attribute:

  event = workflow_executions.events.first

  # equivalent
  event.attributes.task_list
  event.attributes[:task_list]
  event.attributes['task_list']
  event.attributes['taskList']

As shown in the example above keys and method names can be snake_cased or camelCased (strings or symbols).

Special Attributes

The following list of attributes are treated specially. Generally this means they return

  • timeout attributes (e.g. taskStartToCloseTimeout) are returned as integers (number of seconds) or the special symbol :none, implying there is no timeout.
  • childPolicy is cast to a symbol
  • activityType is returned as a {ActivityType} object.
  • workflowType is returned as a {WorkflowType} object.
  • workflowExecution is returned as a {WorkflowExecution} object.
  • taskList is returned as a string, not a hash.

Methods

[]   _camel_case   _cast   _key_string   _snake_case   has_key?   include?   inspect   key?   keys   member?   method_missing   new   to_h  

Public Class methods

Public Instance methods

@param [String,Symbol] key @return Returns the attribute with the given name (key).

has_key?(key)

Alias for key?

include?(key)

Alias for key?

@private

@return [Boolean] Returns true if the attribute with the given

  name is set.

@return [Array<Symbol>] Returns a list of valid keys for this

  set of attributes.
member?(key)

Alias for key?

@return [Hash] Returns all of the attributes in a hash with

  snaked_cased and symbolized keys.

Protected Instance methods

[Validate]