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.



295
296
297
298
299
300
301
# File 'lib/tickle/tickle.rb', line 295

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.



293
294
295
# File 'lib/tickle/tickle.rb', line 293

def interval
  @interval
end

#originalObject

Returns the value of attribute original.



293
294
295
# File 'lib/tickle/tickle.rb', line 293

def original
  @original
end

#startObject

Returns the value of attribute start.



293
294
295
# File 'lib/tickle/tickle.rb', line 293

def start
  @start
end

#typeObject

Returns the value of attribute type.



293
294
295
# File 'lib/tickle/tickle.rb', line 293

def type
  @type
end

#wordObject

Returns the value of attribute word.



293
294
295
# File 'lib/tickle/tickle.rb', line 293

def word
  @word
end

Instance Method Details

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

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



304
305
306
307
308
# File 'lib/tickle/tickle.rb', line 304

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