Class: Sapphire::DSL::Coverage::Requirement
- Defined in:
- lib/sapphire/DSL/Coverage/Requirement.rb
Instance Attribute Summary collapse
-
#behaviors ⇒ Object
readonly
Returns the value of attribute behaviors.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #AddBehavior(behavior) ⇒ Object
-
#initialize(token, hash) ⇒ Requirement
constructor
A new instance of Requirement.
Constructor Details
#initialize(token, hash) ⇒ Requirement
Returns a new instance of Requirement.
15 16 17 18 19 |
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 15 def initialize(token, hash) @token = token @priority = hash[hash.keys.first] @behaviors = [] end |
Instance Attribute Details
#behaviors ⇒ Object (readonly)
Returns the value of attribute behaviors.
13 14 15 |
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 13 def behaviors @behaviors end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
12 13 14 |
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 12 def priority @priority end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
11 12 13 |
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 11 def token @token end |
Instance Method Details
#AddBehavior(behavior) ⇒ Object
21 22 23 |
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 21 def AddBehavior(behavior) @behaviors << behavior end |