Class: Midnight::Token
- Inherits:
-
Object
- Object
- Midnight::Token
- Defined in:
- lib/midnight/midnight.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#position_in_sequence ⇒ Object
Returns the value of attribute position_in_sequence.
-
#start ⇒ Object
Returns the value of attribute start.
-
#type ⇒ Object
Returns the value of attribute type.
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize(word) ⇒ Token
constructor
A new instance of Token.
- #update(type, start = nil, interval = nil, position_in_sequence = nil) ⇒ Object
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
#interval ⇒ Object
Returns the value of attribute interval.
71 72 73 |
# File 'lib/midnight/midnight.rb', line 71 def interval @interval end |
#position_in_sequence ⇒ Object
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 |
#start ⇒ Object
Returns the value of attribute start.
71 72 73 |
# File 'lib/midnight/midnight.rb', line 71 def start @start end |
#type ⇒ Object
Returns the value of attribute type.
71 72 73 |
# File 'lib/midnight/midnight.rb', line 71 def type @type end |
#word ⇒ Object
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 |