Class: CukePages::Feature
- Inherits:
-
Object
- Object
- CukePages::Feature
- Defined in:
- lib/cukepages/feature.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#friendly_filename ⇒ Object
readonly
Returns the value of attribute friendly_filename.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#scenarios ⇒ Object
readonly
Returns the value of attribute scenarios.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#get_binding ⇒ Object
Support ERB templating of member data.
-
#initialize(filename, title, description = "", scenarios = []) ⇒ Feature
constructor
A new instance of Feature.
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
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/cukepages/feature.rb', line 5 def description @description end |
#friendly_filename ⇒ Object (readonly)
Returns the value of attribute friendly_filename.
5 6 7 |
# File 'lib/cukepages/feature.rb', line 5 def friendly_filename @friendly_filename end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
5 6 7 |
# File 'lib/cukepages/feature.rb', line 5 def ref @ref end |
#scenarios ⇒ Object (readonly)
Returns the value of attribute scenarios.
5 6 7 |
# File 'lib/cukepages/feature.rb', line 5 def scenarios @scenarios end |
#title ⇒ Object (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_binding ⇒ Object
Support ERB templating of member data.
16 17 18 |
# File 'lib/cukepages/feature.rb', line 16 def get_binding binding end |