Sha256: a5f8dccc8ed51c05b5b2b54417dd44bc6022f001dc22e11ce0532509a2f61a13

Contents?: true

Size: 279 Bytes

Versions: 10

Compression:

Stored size: 279 Bytes

Contents

class StateList
  def initialize
    @list = {}
  end

  def add(state)
    @list[state.symbol] = state
  end

  def [](symb)
    @list[symb]
  end

  # Convenience methods
  def empty?
    @list.empty?
  end

  def size
    @list.size
  end

  def keys
    @list.keys
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
simplestate-2.0.14 lib/simplestate/state_list.rb
simplestate-2.0.13 lib/simplestate/state_list.rb
simplestate-2.0.12 lib/simplestate/state_list.rb
simplestate-2.0.11 lib/simplestate/state_list.rb
simplestate-2.0.10 lib/simplestate/state_list.rb
simplestate-2.0.9 lib/simplestate/state_list.rb
simplestate-2.0.8 lib/simplestate/state_list.rb
simplestate-2.0.7 lib/simplestate/state_list.rb
simplestate-2.0.6 lib/simplestate/state_list.rb
simplestate-2.0.5 lib/simplestate/state_list.rb