Class: Midnight::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/midnight/midnight.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(word) ⇒ Token

Returns a new instance of Token.



73
74
75
76
# File 'lib/midnight/midnight.rb', line 73

def initialize(word)
  @word = word
  @type = @interval = @start = nil
end

Instance Attribute Details

#intervalObject

Returns the value of attribute interval.



71
72
73
# File 'lib/midnight/midnight.rb', line 71

def interval
  @interval
end

#position_in_sequenceObject

Returns the value of attribute position_in_sequence.



71
72
73
# File 'lib/midnight/midnight.rb', line 71

def position_in_sequence
  @position_in_sequence
end

#startObject

Returns the value of attribute start.



71
72
73
# File 'lib/midnight/midnight.rb', line 71

def start
  @start
end

#typeObject

Returns the value of attribute type.



71
72
73
# File 'lib/midnight/midnight.rb', line 71

def type
  @type
end

#wordObject

Returns the value of attribute word.



71
72
73
# File 'lib/midnight/midnight.rb', line 71

def word
  @word
end

Instance Method Details

#update(type, start = nil, interval = nil, position_in_sequence = nil) ⇒ Object



78
79
80
81
82
83
# File 'lib/midnight/midnight.rb', line 78

def update(type, start=nil, interval=nil, position_in_sequence=nil)
  @start = start
  @type = type
  @interval = interval
  @position_in_sequence = position_in_sequence
end