Class: Gauge::Configuration Private
- Inherits:
-
Object
- Object
- Gauge::Configuration
- Defined in:
- lib/configuration.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .include_configured_modules ⇒ Object private
- .instance ⇒ Object private
Instance Method Summary collapse
- #include(*includes) ⇒ Object private
- #includes ⇒ Object private
-
#initialize ⇒ Configuration
constructor
private
A new instance of Configuration.
- #screengrabber ⇒ Object private
- #screengrabber=(block) ⇒ Object private
Constructor Details
#initialize ⇒ Configuration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Configuration.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/configuration.rb', line 54 def initialize @includes=[] @screengrabber = -> { file = File.open("#{Dir.tmpdir}/screenshot.png", "w+") `gauge_screenshot #{file.path}` file_content = File.binread(file.path) File.delete file return file_content } end |
Class Method Details
.include_configured_modules ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
85 86 87 88 89 90 |
# File 'lib/configuration.rb', line 85 def self.include_configured_modules # include all modules that have been configured # TODO: move this feature to something more specific, ex look at supporting Sandboxed execution. main=TOPLEVEL_BINDING.eval('self') self.instance.includes.each &main.method(:include) end |
.instance ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 |
# File 'lib/configuration.rb', line 65 def self.instance @configuration ||= Configuration.new end |
Instance Method Details
#include(*includes) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 |
# File 'lib/configuration.rb', line 69 def include(*includes) @includes.push *includes end |
#includes ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
73 74 75 |
# File 'lib/configuration.rb', line 73 def includes @includes end |
#screengrabber ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
77 78 79 |
# File 'lib/configuration.rb', line 77 def screengrabber @screengrabber end |
#screengrabber=(block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
81 82 83 |
# File 'lib/configuration.rb', line 81 def screengrabber=(block) @screengrabber=block end |