Module: Bluth::TimingBelt::Notch
- Defined in:
- lib/bluth/timingbelt.rb
Overview
This module extends the Familia::Set that represents a notch. IOW, these are instance methods for notch objs.
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#stamp ⇒ Object
Returns the value of attribute stamp.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
11 12 13 |
# File 'lib/bluth/timingbelt.rb', line 11 def filter @filter end |
#stamp ⇒ Object
Returns the value of attribute stamp.
11 12 13 |
# File 'lib/bluth/timingbelt.rb', line 11 def stamp @stamp end |
#time ⇒ Object
Returns the value of attribute time.
11 12 13 |
# File 'lib/bluth/timingbelt.rb', line 11 def time @time end |
Instance Method Details
#-(other) ⇒ Object
25 26 27 |
# File 'lib/bluth/timingbelt.rb', line 25 def -(other) ((self.time - other.time)/60).to_i end |
#next ⇒ Object
12 13 14 |
# File 'lib/bluth/timingbelt.rb', line 12 def next skip end |
#prev ⇒ Object
15 16 17 |
# File 'lib/bluth/timingbelt.rb', line 15 def prev skip -1 end |
#queue ⇒ Object
22 23 24 |
# File 'lib/bluth/timingbelt.rb', line 22 def queue Bluth::Queue.create_queue stamp end |
#skip(mins = 1) ⇒ Object
18 19 20 21 |
# File 'lib/bluth/timingbelt.rb', line 18 def skip mins=1 time = Time.parse(stamp || '') Bluth::TimingBelt.notch mins, filter, time end |