Class: Turnip::Builder::Feature

Inherits:
Object
  • Object
show all
Includes:
Name, Tags
Defined in:
lib/turnip/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Name

#name

Methods included from Tags

#tags, #tags_hash

Constructor Details

#initialize(raw) ⇒ Feature

Returns a new instance of Feature.



32
33
34
35
36
# File 'lib/turnip/builder.rb', line 32

def initialize(raw)
  @raw = raw
  @scenarios = []
  @backgrounds = []
end

Instance Attribute Details

#backgroundsObject (readonly)

Returns the value of attribute backgrounds.



29
30
31
# File 'lib/turnip/builder.rb', line 29

def backgrounds
  @backgrounds
end

#feature_tagObject

Returns the value of attribute feature_tag.



30
31
32
# File 'lib/turnip/builder.rb', line 30

def feature_tag
  @feature_tag
end

#scenariosObject (readonly)

Returns the value of attribute scenarios.



29
30
31
# File 'lib/turnip/builder.rb', line 29

def scenarios
  @scenarios
end

Instance Method Details

#lineObject



38
39
40
# File 'lib/turnip/builder.rb', line 38

def line
  @raw.line
end

#metadata_hashObject



42
43
44
# File 'lib/turnip/builder.rb', line 42

def 
  super.merge(:type => Turnip.type, :turnip => true)
end