Class: Sapphire::DSL::Coverage::Requirement

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/DSL/Coverage/Requirement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#behaviorsObject (readonly)

Returns the value of attribute behaviors.



13
14
15
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 13

def behaviors
  @behaviors
end

#priorityObject (readonly)

Returns the value of attribute priority.



12
13
14
# File 'lib/sapphire/DSL/Coverage/Requirement.rb', line 12

def priority
  @priority
end

#tokenObject (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