class Vra::Resources
Attributes
client[R]
Public Class Methods
all(client)
click to toggle source
@return [Array] - returns an array of all the resources owned by the user @param [Vra::Client]
# File lib/vra/resources.rb, line 31 def self.all(client) items = client.http_get_paginated_array!("/catalog-service/api/consumer/resources") items.map { |item| Vra::Resource.new(client, data: item) } end
new(client)
click to toggle source
# File lib/vra/resources.rb, line 25 def initialize(client) @client = client end
Public Instance Methods
all_resources()
click to toggle source
@return [Array] - returns an array of all the resources owned by the user
# File lib/vra/resources.rb, line 37 def all_resources self.class.all(client) end
by_id(id)
click to toggle source
# File lib/vra/resources.rb, line 41 def by_id(id) Vra::Resource.new(client, id: id) end