# File lib/state_machine/node_collection.rb, line 19 def initialize(machine, options = {}) assert_valid_keys(options, :index) options = {:index => :name}.merge(options) @machine = machine @nodes = [] @indices = Array(options[:index]).inject({}) {|indices, attribute| indices[attribute] = {}; indices} @default_index = Array(options[:index]).first end