module Ojo

Constants

VERSION

Attributes

configuration[RW]

Public Class Methods

configure() { |configuration| ... } click to toggle source
# File lib/ojo/configuration.rb, line 6
def self.configure
  self.configuration ||= Configuration.new
  yield(configuration) if block_given?
end
display_data_sets(data_sets) click to toggle source
# File lib/ojo/locations.rb, line 11
def self.display_data_sets(data_sets)
  puts '~'*20 + ' Ojo ' + '~'*20
  puts 'Data sets that can be compared:'
  data_sets.each{ |d| puts "  #{d}"}
  puts '~'*45
end
location() click to toggle source
# File lib/ojo/locations.rb, line 7
def self.location
  ::Ojo.configuration.location
end
location=(location) click to toggle source
# File lib/ojo/locations.rb, line 2
def self.location=(location)
  ::Ojo.configure unless ::Ojo.configuration
  ::Ojo.configuration.location = location
end
screenshot(group_name, base_name) click to toggle source
# File lib/ojo/screenshot.rb, line 13
def self.screenshot(group_name, base_name)
  raise 'No screenshot method defined for Ojo.screenshoter!' unless @screenshotter
  raise 'No screenshot location defined for Ojo.location!' unless ::Ojo.configuration.location

  filename = File.join(::Ojo.configuration.location, group_name, "#{base_name}.png")

  @screenshotter.call filename
end
screenshotter() click to toggle source
# File lib/ojo/screenshot.rb, line 9
def self.screenshotter
  @screenshotter
end
screenshotter=(screenshotter) click to toggle source
# File lib/ojo/screenshot.rb, line 5
def self.screenshotter=(screenshotter)
  @screenshotter = screenshotter
end