class Chores
Attributes
chore[R]
Public Class Methods
define(name, &block)
click to toggle source
# File lib/chores_kit/chores.rb, line 4 def self.define(name, &block) proxy = ChoresKit::DefinitionProxy.new(name) proxy.instance_eval(&block) if block_given? proxy.chore end
load(filename)
click to toggle source
# File lib/chores_kit/chores.rb, line 14 def self.load(filename) new(filename).chore end
load_all()
click to toggle source
# File lib/chores_kit/chores.rb, line 18 def self.load_all tasks = Pathname.glob('tasks/**/*.rb') tasks.each do |task_file| load(Pathname.pwd + task_file) end end
new(filename)
click to toggle source
# File lib/chores_kit/chores.rb, line 10 def initialize(filename) @chore = instance_eval(File.read(filename)) end
Public Instance Methods
run()
click to toggle source
# File lib/chores_kit/chores.rb, line 26 def run @chore.run! end