Class: Tickle::Token

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original, word = nil, type = nil, start = nil, interval = nil) ⇒ Token

Returns a new instance of Token.



298
299
300
301
302
303
304
# File 'lib/tickle/tickle.rb', line 298

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

Instance Attribute Details

#intervalObject

Returns the value of attribute interval.



296
297
298
# File 'lib/tickle/tickle.rb', line 296

def interval
  @interval
end

#originalObject

Returns the value of attribute original.



296
297
298
# File 'lib/tickle/tickle.rb', line 296

def original
  @original
end

#startObject

Returns the value of attribute start.



296
297
298
# File 'lib/tickle/tickle.rb', line 296

def start
  @start
end

#typeObject

Returns the value of attribute type.



296
297
298
# File 'lib/tickle/tickle.rb', line 296

def type
  @type
end

#wordObject

Returns the value of attribute word.



296
297
298
# File 'lib/tickle/tickle.rb', line 296

def word
  @word
end

Instance Method Details

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

Updates an existing token. Mostly used by the repeater class.



307
308
309
310
311
# File 'lib/tickle/tickle.rb', line 307

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