class GPUEater::APIv1::ProductsResnpose

Attributes

images[RW]
products[RW]
ssh_keys[RW]

Public Class Methods

new(j) click to toggle source
# File lib/gpueater.rb, line 97
def initialize(j)
  @images = j['images']
  @ssh_keys = j['ssh_keys']
  @products = j['products']
end

Public Instance Methods

find_image(n) click to toggle source
# File lib/gpueater.rb, line 102
def find_image(n)
  @images.values.select{|v| v['name'] == n }.pop
end
find_product(n) click to toggle source
# File lib/gpueater.rb, line 108
def find_product(n)
  @products.select{|v| v['name'] == n }.pop
end
find_ssh_key(n) click to toggle source
# File lib/gpueater.rb, line 105
def find_ssh_key(n)
  @ssh_keys.select{|v| v['name'] == n }.pop
end
to_s() click to toggle source
# File lib/gpueater.rb, line 111
    def to_s
       [@images,@ssh_keys,@products].to_s
end