class RakeMKV::Code

Code

Constants

CODES

Attributes

index[R]

Public Class Methods

[](index) click to toggle source

Short hand to initialize code and convert it to symbol

# File lib/rakemkv/code.rb, line 59
def self.[](index)
  new(index).to_sym
end
new(index) click to toggle source

Initialize code

# File lib/rakemkv/code.rb, line 49
def initialize(index)
  @index = index.to_i
end

Public Instance Methods

to_sym() click to toggle source

Take code and convert it to the proper symbol

# File lib/rakemkv/code.rb, line 54
def to_sym
  CODES[index]
end