Class: Awesm::Conversion
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Awesm::Conversion
- Defined in:
- lib/awesm/conversion.rb
Constant Summary collapse
- PATH =
'/conversions'
Class Method Summary collapse
Class Method Details
.convert(params) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/awesm/conversion.rb', line 5 def self.convert(params) response = Awesm.http_client.get("#{Awesm::HOST}#{PATH}/new", params) unless response.status == 200 nil else json = JSON.parse response.content new(json['response']['conversion']) end end |