Class: SVQcsData

Inherits:
Object
  • Object
show all
Defined in:
lib/SVClient/SVQcsData.rb

Direct Known Subclasses

SVRequest, SVResponse

Instance Method Summary collapse

Instance Method Details

#getdate(key, format) ⇒ Object

Method to get the value in certain date format



39
40
41
42
# File 'lib/SVClient/SVQcsData.rb', line 39

def getdate(key, format)
  @value = getvalue(key)
  return SVUtils::getdate(@value, format)
end

#getvalue(key) ⇒ Object

Method to get the value from the params array



18
19
20
21
# File 'lib/SVClient/SVQcsData.rb', line 18

def getvalue(key)
  return @@params[key] if (key != nil)
  return nil
end

#getvalueasfloat(key) ⇒ Object



23
24
25
# File 'lib/SVClient/SVQcsData.rb', line 23

def getvalueasfloat(key)
  return SVUtils.getfloat(getvalue(key)[0])
end

#getvalueasint(key) ⇒ Object



27
28
29
30
31
# File 'lib/SVClient/SVQcsData.rb', line 27

def getvalueasint(key)
  value = getvalue(key)
  return value[0].to_i if(value != nil && !SVUtils::isnullorempty(value[0]))
  return nil
end

#printparamsObject

Method to print the parameters



45
46
47
48
# File 'lib/SVClient/SVQcsData.rb', line 45

def printparams
  return if @@params.empty?
  @@params.each {|key, value| puts "#{key} : #{value}" }
end

#setvalue(key, value) ⇒ Object

Method to set the value to the params array



34
35
36
# File 'lib/SVClient/SVQcsData.rb', line 34

def setvalue(key, value)
  @@params[key] = value
end