Class: Tickle::Token
- Inherits:
-
Object
- Object
- Tickle::Token
- Defined in:
- lib/tickle/tickle.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#original ⇒ Object
Returns the value of attribute original.
-
#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(original, word = nil, type = nil, start = nil, interval = nil) ⇒ Token
constructor
A new instance of Token.
-
#update(type, start = nil, interval = nil) ⇒ Object
Updates an existing token.
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
#interval ⇒ Object
Returns the value of attribute interval.
293 294 295 |
# File 'lib/tickle/tickle.rb', line 293 def interval @interval end |
#original ⇒ Object
Returns the value of attribute original.
293 294 295 |
# File 'lib/tickle/tickle.rb', line 293 def original @original end |
#start ⇒ Object
Returns the value of attribute start.
293 294 295 |
# File 'lib/tickle/tickle.rb', line 293 def start @start end |
#type ⇒ Object
Returns the value of attribute type.
293 294 295 |
# File 'lib/tickle/tickle.rb', line 293 def type @type end |
#word ⇒ Object
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 |