Module: Sitespec
- Defined in:
- lib/sitespec.rb,
lib/sitespec/version.rb,
lib/sitespec/artifact.rb,
lib/sitespec/configuration.rb
Defined Under Namespace
Classes: Artifact, Configuration
Constant Summary collapse
- VERSION =
"1.2.1"
Class Method Summary collapse
-
.artifacts_count ⇒ Integer
Return how many artifacts (files) generated on this process.
-
.configuration ⇒ Object
Provide singleton configuration object shared with the current process.
-
.configure(&block) ⇒ Object
Provide friendly interface to access to Sitespec.configuration.
-
.increment_artifacts_count ⇒ Object
Use this method when a new artifact is generated.
Class Method Details
.artifacts_count ⇒ Integer
Return how many artifacts (files) generated on this process. This count is to be shown after all examples are finished.
10 11 12 |
# File 'lib/sitespec.rb', line 10 def artifacts_count @artifacts_count || 0 end |
.configuration ⇒ Object
Provide singleton configuration object shared with the current process. All of user-configuration should be stored in this singleton object.
18 19 20 |
# File 'lib/sitespec.rb', line 18 def configuration @configuration ||= Sitespec::Configuration.new end |
.configure(&block) ⇒ Object
Provide friendly interface to access to Sitespec.configuration. The configuration object passed to given block is same with ‘Sitespec.configuration`.
29 30 31 |
# File 'lib/sitespec.rb', line 29 def configure(&block) block.call(configuration) end |
.increment_artifacts_count ⇒ Object
Use this method when a new artifact is generated. In almost cases, it’s called from Sitespec::Artifact class.
35 36 37 |
# File 'lib/sitespec.rb', line 35 def increment_artifacts_count @artifacts_count = artifacts_count + 1 end |