module GhostInThePost
Constants
- ATTRIBUTE_NAMES
- DEFAULT_TIMEOUT
- DEFAULT_WAIT_EVENT
- VERSION
Public Class Methods
config=(new_config={})
click to toggle source
# File lib/ghost_in_the_post.rb, line 28 def self.config=(new_config={}) self.complain_about_unknown_keys(new_config.keys) new_config.each do |key, value| self.send("#{key}=", value) end raise ArgumentError, "phantomjs not found at path `#{@@phantomjs_path}` provided to GhostInThePost" unless File.exist?(phantomjs_path) end
includes=(to_include)
click to toggle source
# File lib/ghost_in_the_post.rb, line 41 def self.includes= to_include @@includes = Array(to_include) end
phantomjs_path()
click to toggle source
# File lib/ghost_in_the_post.rb, line 37 def self.phantomjs_path @@phantomjs_path or raise ArgumentError, "GhostInThePost.config.phantomjs_path is not set" end
Private Class Methods
complain_about_unknown_keys(keys)
click to toggle source
# File lib/ghost_in_the_post.rb, line 47 def self.complain_about_unknown_keys(keys) invalid_keys = keys - ATTRIBUTE_NAMES if invalid_keys.size > 0 raise ArgumentError, "Unknown configuration parameters: #{invalid_keys}", caller(1) end end