Sha256: 7c2c634870736ca3b45e9ab8353d1f8c9bfb280c928c48a8ba43fe203a84a810
Contents?: true
Size: 674 Bytes
Versions: 6
Compression:
Stored size: 674 Bytes
Contents
require './lib/timeboss/calendars' namespace :timeboss do namespace :calendars do TimeBoss::Calendars.each do |entry| namespace entry.name do desc "Evaluate an expression for the #{entry.name} calendar" task :evaluate, %i[expression] => ['timeboss:init'] do |_, args| puts entry.calendar.parse(args[:expression]) end desc "Open a REPL with the #{entry.name} calendar" task repl: ['timeboss:init'] do require 'timeboss/support/shellable' TimeBoss::Support::Shellable.open(entry.calendar) end task shell: ["timeboss:calendars:#{entry.name}:repl"] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems