Class: Cuker::GherkinRipper
- Inherits:
-
Object
- Object
- Cuker::GherkinRipper
- Includes:
- GherkinHelper, LoggerSetup
- Defined in:
- lib/cuker/gherkin_ripper.rb
Constant Summary collapse
- NoFilesFoundError =
Class.new IOError
Instance Attribute Summary collapse
-
#features ⇒ Object
Returns the value of attribute features.
-
#location ⇒ Object
Returns the value of attribute location.
Attributes included from LoggerSetup
Instance Method Summary collapse
- #ast_map ⇒ Object
-
#initialize(path = '*') ⇒ GherkinRipper
constructor
attr_reader :ast_map.
Methods included from LoggerSetup
#init_logger, reset_appender_log_levels
Methods included from GherkinHelper
Constructor Details
#initialize(path = '*') ⇒ GherkinRipper
attr_reader :ast_map
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cuker/gherkin_ripper.rb', line 19 def initialize path = '*' init_logger @location = path.strip @location = '.' if @location.empty? # handle blank path searching all features ext = '.feature' @features = get_files @location, ext @log.trace "Gherkin ripper running at #{path}" @parser = Gherkin::Parser.new @ast_map = {} @log.trace "Parsed '.feature' files @ #{path} = #{@features.size} files" end |
Instance Attribute Details
#features ⇒ Object
Returns the value of attribute features.
16 17 18 |
# File 'lib/cuker/gherkin_ripper.rb', line 16 def features @features end |
#location ⇒ Object
Returns the value of attribute location.
15 16 17 |
# File 'lib/cuker/gherkin_ripper.rb', line 15 def location @location end |
Instance Method Details
#ast_map ⇒ Object
35 36 37 38 |
# File 'lib/cuker/gherkin_ripper.rb', line 35 def ast_map @ast_map = parse_all if @ast_map.empty? @ast_map end |