lib/atlas_rb/resource.rb in atlas_rb-0.0.40 vs lib/atlas_rb/resource.rb in atlas_rb-0.0.41

- old
+ new

@@ -3,9 +3,11 @@ module AtlasRb class Resource extend AtlasRb::FaradayHelper def self.find(id) - JSON.parse(connection({}).get('/resources/' + id)&.body) + result = JSON.parse(connection({}).get('/resources/' + id)&.body) + { "klass" => result.first[0].capitalize, + "resource" => result.first[1] } end end end