lib/jess/computers.rb in jess-0.2.0 vs lib/jess/computers.rb in jess-0.3.0

- old
+ new

@@ -12,7 +12,13 @@ # Retrieve a computer by ID. def find(id) json = JSON.parse(http_client.get("computers/id/#{id}")) Computer.new(json.fetch("computer")) end + + # Get all computer IDs. + def all_ids + json = JSON.parse(http_client.get("computers")) + json["computers"].map { |c| c["id"] } + end end end