Class: Sikuli::Config
- Inherits:
-
Object
- Object
- Sikuli::Config
- Defined in:
- lib/sikuli/config.rb
Class Attribute Summary collapse
-
.highlight_on_find ⇒ Object
Public: the Boolean representing whether or not to perform a 1 second highlight when an image is matched through Searchable#find, Searchable#find_all.
Class Method Summary collapse
-
.image_path ⇒ Object
Public: the absolute file path where Sikuli will look for images when a just a filename is passed to a search or click method.
-
.image_path=(path) ⇒ Object
Public: the setter for the absolute file path where Sikuli will search for images with given a filename as an image.
-
.logging=(boolean) ⇒ Object
Public: turns stdout logging on and off for the Sikuli java classes.
-
.run(*args) ⇒ Object
Public: convienence method for grouping the setting of config variables.
Class Attribute Details
.highlight_on_find ⇒ Object
Public: the Boolean representing whether or not to perform a 1 second highlight when an image is matched through Searchable#find, Searchable#find_all. Defaults to false.
10 11 12 |
# File 'lib/sikuli/config.rb', line 10 def highlight_on_find @highlight_on_find end |
Class Method Details
.image_path ⇒ Object
Public: the absolute file path where Sikuli will look for images when a just a filename is passed to a search or click method
Returns the String representation of the path
16 17 18 |
# File 'lib/sikuli/config.rb', line 16 def image_path java.lang.System.getProperty("SIKULI_IMAGE_PATH") end |
.image_path=(path) ⇒ Object
Public: the setter for the absolute file path where Sikuli will search for images with given a filename as an image
Examples
Sikuli::Config.image_path = "/Users/clemley/sikuli/images/"
Returns nothing
28 29 30 |
# File 'lib/sikuli/config.rb', line 28 def image_path=(path) java.lang.System.setProperty("SIKULI_IMAGE_PATH", path) end |
.logging=(boolean) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/sikuli/config.rb', line 40 def logging=(boolean) return unless [TrueClass, FalseClass].include? boolean.class org.sikuli.script::Settings.InfoLogs = boolean org.sikuli.script::Settings.ActionLogs = boolean org.sikuli.script::Settings.DebugLogs = boolean end |
.run(*args) ⇒ Object
59 60 61 62 63 |
# File 'lib/sikuli/config.rb', line 59 def run(*args) if block_given? yield self end end |