Class: SVQcsData
- Inherits:
-
Object
- Object
- SVQcsData
- Defined in:
- lib/SVClient/SVQcsData.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#getdate(key, format) ⇒ Object
Method to get the value in certain date format.
-
#getvalue(key) ⇒ Object
Method to get the value from the params array.
- #getvalueasfloat(key) ⇒ Object
- #getvalueasint(key) ⇒ Object
-
#printparams ⇒ Object
Method to print the parameters.
-
#setvalue(key, value) ⇒ Object
Method to set the value to the params array.
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 |
#printparams ⇒ Object
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 |