Class: RubyRest::Client::Yaml
- Defined in:
- lib/rubyrest/client.rb
Instance Method Summary collapse
- #hidrate_data(response) ⇒ Object
-
#initialize(host, port) ⇒ Yaml
constructor
A new instance of Yaml.
- #serialize_data(hash) ⇒ Object
Methods inherited from Abstract
#create, #dashboard, #delete, #encode_path, #http, #prepare_headers, #retrieve, #to_query_string, #update
Constructor Details
permalink #initialize(host, port) ⇒ Yaml
Returns a new instance of Yaml.
104 105 106 107 |
# File 'lib/rubyrest/client.rb', line 104 def initialize( host, port ) super( host, port ) @format = "yaml" end |
Instance Method Details
permalink #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 |
permalink #serialize_data(hash) ⇒ Object
[View source]
113 114 115 |
# File 'lib/rubyrest/client.rb', line 113 def serialize_data( hash ) hash.to_yaml end |