Class: Cuporter::FeatureParser::Language

Inherits:
Object
  • Object
show all
Defined in:
lib/cuporter/feature_parser/language.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line_1) ⇒ Language

Returns a new instance of Language.



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cuporter/feature_parser/language.rb', line 20

def initialize(line_1)
  @iso_code = 'en'
  if (line_1.to_s =~ LANGUAGE_LINE)
    @iso_code = $1
    warn($gherkin_warning) if $gherkin_warning
  end
  @feature_line          = pattern_for('feature')
  @scenario_line         = pattern_for('scenario')
  @scenario_outline_line = pattern_for('scenario_outline')
  @examples_line         = pattern_for('examples')
end

Instance Attribute Details

#examples_lineObject (readonly)

Returns the value of attribute examples_line.



18
19
20
# File 'lib/cuporter/feature_parser/language.rb', line 18

def examples_line
  @examples_line
end

#feature_lineObject (readonly)

Returns the value of attribute feature_line.



18
19
20
# File 'lib/cuporter/feature_parser/language.rb', line 18

def feature_line
  @feature_line
end

#scenario_lineObject (readonly)

Returns the value of attribute scenario_line.



18
19
20
# File 'lib/cuporter/feature_parser/language.rb', line 18

def scenario_line
  @scenario_line
end

#scenario_outline_lineObject (readonly)

Returns the value of attribute scenario_outline_line.



18
19
20
# File 'lib/cuporter/feature_parser/language.rb', line 18

def scenario_outline_line
  @scenario_outline_line
end