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.
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
#interval ⇒ Object
Returns the value of attribute interval.
311 312 313 |
# File 'lib/tickle/tickle.rb', line 311 def interval @interval end |
#original ⇒ Object
Returns the value of attribute original.
311 312 313 |
# File 'lib/tickle/tickle.rb', line 311 def original @original end |
#start ⇒ Object
Returns the value of attribute start.
311 312 313 |
# File 'lib/tickle/tickle.rb', line 311 def start @start end |
#type ⇒ Object
Returns the value of attribute type.
311 312 313 |
# File 'lib/tickle/tickle.rb', line 311 def type @type end |
#word ⇒ Object
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 |