Class: Sapphire::DSL::TestPlans::Parameters

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/DSL/TestPlans/Parameter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeParameters

Returns a new instance of Parameters.



19
20
21
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 19

def initialize()
  $parameters ||= {}
end

Class Method Details

.createObject



11
12
13
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 11

def self.create
  @@instance ||= Parameters.new
end

.instanceObject



15
16
17
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 15

def self.instance
  @@instance ||= self.create
end

Instance Method Details

#Add(item) ⇒ Object



23
24
25
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 23

def Add(item)
  $parameters.merge! item
end

#Contains(item) ⇒ Object



27
28
29
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 27

def Contains(item)
  $parameters.has_key? item
end

#Get(item) ⇒ Object



31
32
33
# File 'lib/sapphire/DSL/TestPlans/Parameter.rb', line 31

def Get(item)
  $parameters[item]
end