Class: CukePages::Feature

Inherits:
Object
  • Object
show all
Defined in:
lib/cukepages/feature.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, title, description = "", scenarios = []) ⇒ Feature

Returns a new instance of Feature.



7
8
9
10
11
12
13
# File 'lib/cukepages/feature.rb', line 7

def initialize(filename, title, description = "", scenarios = [])
	@ref = filename.split(".feature").first
	@friendly_filename = @ref.gsub(/[_-]/, ' ').capitalize
	@title = title
	@description = description
	@scenarios = scenarios	
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/cukepages/feature.rb', line 5

def description
  @description
end

#friendly_filenameObject (readonly)

Returns the value of attribute friendly_filename.



5
6
7
# File 'lib/cukepages/feature.rb', line 5

def friendly_filename
  @friendly_filename
end

#refObject (readonly)

Returns the value of attribute ref.



5
6
7
# File 'lib/cukepages/feature.rb', line 5

def ref
  @ref
end

#scenariosObject (readonly)

Returns the value of attribute scenarios.



5
6
7
# File 'lib/cukepages/feature.rb', line 5

def scenarios
  @scenarios
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/cukepages/feature.rb', line 5

def title
  @title
end

Instance Method Details

#get_bindingObject

Support ERB templating of member data.



16
17
18
# File 'lib/cukepages/feature.rb', line 16

def get_binding
 		binding
end