class SocketLabs::InjectionApi::Core::Serialization::CustomHeaderJson
Represents a custom header as a name and value pair. To be serialized into JSON string before sending to the Injection Api.
Attributes
name[RW]
name of the custom header.
value[RW]
value of the custom header.
Public Class Methods
new( name = nil, value = nil )
click to toggle source
Initializes a new instance of the CustomHeaderJson
class @param [String] name @param [String] value
# File lib/socketlabs/injectionapi/core/serialization/custom_header_json.rb, line 18 def initialize( name = nil, value = nil ) @name = name @value = value end
Public Instance Methods
to_hash()
click to toggle source
build json hash for CustomHeaderJson
@return [hash]
# File lib/socketlabs/injectionapi/core/serialization/custom_header_json.rb, line 28 def to_hash { :name => @name, :value => @value } end