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.



313
314
315
316
317
318
319
# File 'lib/tickle/tickle.rb', line 313

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.



311
312
313
# File 'lib/tickle/tickle.rb', line 311

def interval
  @interval
end

#originalObject

Returns the value of attribute original.



311
312
313
# File 'lib/tickle/tickle.rb', line 311

def original
  @original
end

#startObject

Returns the value of attribute start.



311
312
313
# File 'lib/tickle/tickle.rb', line 311

def start
  @start
end

#typeObject

Returns the value of attribute type.



311
312
313
# File 'lib/tickle/tickle.rb', line 311

def type
  @type
end

#wordObject

Returns the value of attribute word.



311
312
313
# File 'lib/tickle/tickle.rb', line 311

def word
  @word
end

Instance Method Details

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

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



322
323
324
325
326
# File 'lib/tickle/tickle.rb', line 322

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