929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
|
# File 'lib/kronk/response.rb', line 929
def to_hash
result = {
'name' => @name,
'value' => @value,
'domain' => @domain,
'path' => @path,
}
{
'expiry' => @expiry,
'secure' => (true if @secure),
'http_only' => (true if @http_only),
'version' => (@version if version != 0),
'comment' => @comment,
'comment_url' => @comment_url,
'discard' => (true if @discard),
'ports' => @ports
}.each do |name, value|
result[name] = value if value
end
result
end
|