Sha256: 6ecacaad50e1dd40139eb6afc6650f13f431bc7b48b4bdf142b44d9454c0546e
Contents?: true
Size: 362 Bytes
Versions: 1
Compression:
Stored size: 362 Bytes
Contents
module Devrant class Rants include HTTParty include Devrant def all structuralize(self.class.get('/devrant/rants')).rants end def get_rant(id) rant = structuralize(self.class.get("/devrant/rants/#{id}")).rant return rant unless rant.nil? raise ArgumentError.new("No rant found for id #{id}") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devrant-0.0.2 | lib/devrant/rants.rb |