Module: Ably::Modules::Enum

Overview

Enum brings Enum like functionality used in other languages to Ruby

Examples:

class House
  extend Ably::Moduels::Enum
  CONSTRUCTION = ruby_enum('CONSTRUCTION',
    :brick,
    :steel,
    :wood
  )
end

House::CONSTRUCTION(:brick).to_i # => 0
House::CONSTRUCTION('Wood').to_i # => 2
House::CONSTRUCTION.Wood == :wood # => true

Defined Under Namespace

Classes: Base