class Providence::Eye

Attributes

ec[RW]
watchrs[RW]

Public Class Methods

get_image(image_name) click to toggle source
# File lib/providence/eye.rb, line 6
def get_image(image_name)
  File.join(File.expand_path(File.dirname(__FILE__)), '..', '..', 'images', 'glass', "#{image_name}.png")
end
growl(message, image=info_image, title='Providence') click to toggle source
# File lib/providence/eye.rb, line 18
def growl(message, image=info_image, title='Providence')
  Growl.notify message, :title => title, :icon => image
end
method_missing(sym, *arguments, &block) click to toggle source
Calls superclass method
# File lib/providence/eye.rb, line 10
def method_missing(sym, *arguments, &block)
  if sym.to_s =~ /^(.*)_image$/
    get_image($1)
  else
    super
  end
end
new(eval_context, *args) click to toggle source
# File lib/providence/eye.rb, line 23
def initialize eval_context, *args
  @ec = eval_context
  @watchrs = args || []
end

Public Instance Methods

run_suite() click to toggle source
# File lib/providence/eye.rb, line 28
def run_suite
  watchrs.each {|w| w.class.run_all }
end
watch() click to toggle source
# File lib/providence/eye.rb, line 32
def watch
  watchrs.each {|w| w.watch(ec) }
end