Class: NVX::SDS::APIParam
- Inherits:
-
Object
- Object
- NVX::SDS::APIParam
- Defined in:
- lib/nvx/sds/apiparam.rb
Instance Method Summary collapse
-
#initialize(key, value) ⇒ APIParam
constructor
The initialize method stores the key and value of the parameter to be passed.
-
#key ⇒ Object
Returns the key.
-
#to_s ⇒ Object
Overload to return a CGI::escape version of the key=value pair.
-
#value ⇒ Object
Returns the value.
Constructor Details
#initialize(key, value) ⇒ APIParam
The initialize method stores the key and value of the parameter to be passed.
12 13 14 15 |
# File 'lib/nvx/sds/apiparam.rb', line 12 def initialize(key, value) @key = key @value = value end |
Instance Method Details
#key ⇒ Object
Returns the key.
18 19 20 |
# File 'lib/nvx/sds/apiparam.rb', line 18 def key @key end |
#to_s ⇒ Object
Overload to return a CGI::escape version of the key=value pair.
28 29 30 |
# File 'lib/nvx/sds/apiparam.rb', line 28 def to_s CGI::escape(@key.to_s) + "=" + CGI::escape(@value.to_s); end |
#value ⇒ Object
Returns the value.
23 24 25 |
# File 'lib/nvx/sds/apiparam.rb', line 23 def value @value end |