class Bumbleworks::Schedule
Attributes
id[R]
original_hash[R]
Public Class Methods
all()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 7 def all Bumbleworks.dashboard.schedules.map do |hsh| new(hsh) end end
count()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 13 def count all.count end
new(schedule_hash)
click to toggle source
# File lib/bumbleworks/schedule.rb, line 18 def initialize(schedule_hash) @original_hash = schedule_hash @id = @original_hash['_id'] end
Public Instance Methods
expression()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 31 def expression Bumbleworks::Expression.from_fei(@original_hash['owner']) end
next_at()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 43 def next_at Time.parse(@original_hash['at']) end
once?()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 39 def once? !repeating? end
original_plan()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 47 def original_plan @original_hash['original'] end
process()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 27 def process Bumbleworks::Process.new(wfid) end
repeating?()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 35 def repeating? ['cron', 'every'].include? expression.tree[0] end
test_clause()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 51 def test_clause expression.tree[1]['test'] end
wfid()
click to toggle source
# File lib/bumbleworks/schedule.rb, line 23 def wfid @original_hash['wfid'] end