Class: Sapphire::DSL::Coverage::Feature
- Defined in:
- lib/sapphire/DSL/Coverage/Feature.rb
Instance Attribute Summary collapse
-
#requirements ⇒ Object
readonly
Returns the value of attribute requirements.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #AddBehavior(behavior) ⇒ Object
- #AddRequirement(requirement) ⇒ Object
- #Describe(text) ⇒ Object
-
#initialize(token) ⇒ Feature
constructor
A new instance of Feature.
Constructor Details
#initialize(token) ⇒ Feature
Returns a new instance of Feature.
15 16 17 18 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 15 def initialize(token) @token = token @requirements = [] end |
Instance Attribute Details
#requirements ⇒ Object (readonly)
Returns the value of attribute requirements.
12 13 14 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 12 def requirements @requirements end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
13 14 15 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 13 def token @token end |
Instance Method Details
#AddBehavior(behavior) ⇒ Object
24 25 26 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 24 def AddBehavior(behavior) @requirements.last().AddBehavior behavior end |
#AddRequirement(requirement) ⇒ Object
20 21 22 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 20 def AddRequirement(requirement) @requirements << requirement end |
#Describe(text) ⇒ Object
28 29 30 |
# File 'lib/sapphire/DSL/Coverage/Feature.rb', line 28 def Describe(text) end |