Class: Cucumber::Configuration

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

Overview

The base class for configuring settings for a Cucumber run.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_options = {}) ⇒ Configuration

Returns a new instance of Configuration.


13
14
15
# File 'lib/cucumber/configuration.rb', line 13

def initialize(user_options = {})
  @options = default_options.merge(user_options)
end

Class Method Details

.defaultObject


4
5
6
# File 'lib/cucumber/configuration.rb', line 4

def self.default
  new
end

.parse(argument) ⇒ Object


8
9
10
11
# File 'lib/cucumber/configuration.rb', line 8

def self.parse(argument)
  return new(argument) if argument.is_a?(Hash)
  argument
end

Instance Method Details

#autoload_code_pathsObject


37
38
39
# File 'lib/cucumber/configuration.rb', line 37

def autoload_code_paths
  @options[:autoload_code_paths]
end

#dry_run?Boolean

Returns:

  • (Boolean)

17
18
19
# File 'lib/cucumber/configuration.rb', line 17

def dry_run?
  @options[:dry_run]
end

#expand?Boolean

Returns:

  • (Boolean)

29
30
31
# File 'lib/cucumber/configuration.rb', line 29

def expand?
  @options[:expand]
end

#guess?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'lib/cucumber/configuration.rb', line 21

def guess?
  @options[:guess]
end

#pathsObject


33
34
35
# File 'lib/cucumber/configuration.rb', line 33

def paths
  @options[:paths]
end

#snippet_typeObject


41
42
43
# File 'lib/cucumber/configuration.rb', line 41

def snippet_type
  @options[:snippet_type]
end

#strict?Boolean

Returns:

  • (Boolean)

25
26
27
# File 'lib/cucumber/configuration.rb', line 25

def strict?
  @options[:strict]
end