Class: ForemanFogProxmox::Vms

Inherits:
Object
  • Object
show all
Defined in:
app/models/foreman_fog_proxmox/vms.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items = []) ⇒ Vms

Returns a new instance of Vms.



33
34
35
# File 'app/models/foreman_fog_proxmox/vms.rb', line 33

def initialize(items = [])
  @items = items
end

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items.



22
23
24
# File 'app/models/foreman_fog_proxmox/vms.rb', line 22

def items
  @items
end

Instance Method Details

#all(_filters = {}) ⇒ Object

TODO: Pagination with filters



29
30
31
# File 'app/models/foreman_fog_proxmox/vms.rb', line 29

def all(_filters = {})
  items
end

#each(&block) ⇒ Object



24
25
26
# File 'app/models/foreman_fog_proxmox/vms.rb', line 24

def each(&block)
  @items.each(&block)
end