Class: Sitespec::Configuration
- Inherits:
-
Object
- Object
- Sitespec::Configuration
- Defined in:
- lib/sitespec/configuration.rb
Constant Summary collapse
- DEFAULT_BUILD_PATH =
"build"
Instance Attribute Summary collapse
Instance Method Summary collapse
- #build_pathname ⇒ Pathname
- #disable ⇒ Object
- #enable ⇒ Object
- #enabled ⇒ Object (also: #enabled?)
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 |
# File 'lib/sitespec/configuration.rb', line 9 def initialize @enabled = true @auto_complete_html_path = true end |
Instance Attribute Details
#auto_complete_html_path ⇒ Object
14 15 16 |
# File 'lib/sitespec/configuration.rb', line 14 def auto_complete_html_path !!@auto_complete_html_path end |
#build_path ⇒ Object
18 19 20 |
# File 'lib/sitespec/configuration.rb', line 18 def build_path @build_path || DEFAULT_BUILD_PATH end |
Instance Method Details
#build_pathname ⇒ Pathname
23 24 25 |
# File 'lib/sitespec/configuration.rb', line 23 def build_pathname Pathname.new(build_path) end |
#disable ⇒ Object
27 28 29 |
# File 'lib/sitespec/configuration.rb', line 27 def disable @enabled = false end |
#enable ⇒ Object
31 32 33 |
# File 'lib/sitespec/configuration.rb', line 31 def enable @enabled = true end |
#enabled ⇒ Object Also known as: enabled?
35 36 37 |
# File 'lib/sitespec/configuration.rb', line 35 def enabled !!@enabled end |