Module: Topaz::API

Included in:
Clock
Defined in:
lib/topaz/api.rb

Overview

Convenience shortcuts for the clock

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/topaz/api.rb', line 6

def self.included(base)
  base.send(:extend, Forwardable)
  base.send(:def_delegators, :source, :interval, :interval=, :join, 
            :pause, :pause?, :paused?, :running?, :tempo, :toggle_pause, :unpause)
end

Instance Method Details

#time_since_startTime

Alias for Clock#time

Returns:

  • (Time)


14
15
16
# File 'lib/topaz/api.rb', line 14

def time_since_start
  time
end