Class: Sitespec::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/sitespec/configuration.rb

Constant Summary collapse

DEFAULT_BUILD_PATH =
"build"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_pathObject



14
15
16
# File 'lib/sitespec/configuration.rb', line 14

def auto_complete_html_path
  !!@auto_complete_html_path
end

#build_pathObject



18
19
20
# File 'lib/sitespec/configuration.rb', line 18

def build_path
  @build_path || DEFAULT_BUILD_PATH
end

Instance Method Details

#build_pathnamePathname

Returns:

  • (Pathname)


23
24
25
# File 'lib/sitespec/configuration.rb', line 23

def build_pathname
  Pathname.new(build_path)
end

#disableObject



27
28
29
# File 'lib/sitespec/configuration.rb', line 27

def disable
  @enabled = false
end

#enableObject



31
32
33
# File 'lib/sitespec/configuration.rb', line 31

def enable
  @enabled = true
end

#enabledObject Also known as: enabled?



35
36
37
# File 'lib/sitespec/configuration.rb', line 35

def enabled
  !!@enabled
end