Class: RubyRest::Client::Yaml

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rubyrest/client.rb

Instance Method Summary collapse

Methods inherited from Abstract

#create, #dashboard, #delete, #encode_path, #http, #prepare_headers, #retrieve, #to_query_string, #update

Constructor Details

#initialize(host, port) ⇒ Yaml

Returns a new instance of Yaml.

[View source]

104
105
106
107
# File 'lib/rubyrest/client.rb', line 104

def initialize( host, port )
  super( host, port )
  @format = "yaml"
end

Instance Method Details

#hidrate_data(response) ⇒ Object

[View source]

109
110
111
# File 'lib/rubyrest/client.rb', line 109

def hidrate_data( response )
  YAML::load( response.body ) if response.body
end

#serialize_data(hash) ⇒ Object

[View source]

113
114
115
# File 'lib/rubyrest/client.rb', line 113

def serialize_data( hash )
  hash.to_yaml 
end