Class: Proxmox::Base
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
bench, rest_del, rest_get, rest_post, rest_put
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &exe) ⇒ Object
136
137
138
139
140
141
142
|
# File 'lib/pve/proxmox.rb', line 136
def method_missing method, *args, &exe
if instance_variable_defined? "@#{method}"
instance_variable_get "@#{method}"
else
super
end
end
|
Instance Attribute Details
#sid ⇒ Object
Returns the value of attribute sid.
118
119
120
|
# File 'lib/pve/proxmox.rb', line 118
def sid
@sid
end
|
Class Method Details
.__new__(data) ⇒ Object
121
122
123
124
|
# File 'lib/pve/proxmox.rb', line 121
def __new__ data
n = allocate
n.send :__update__, data
end
|
.fetch(predata) ⇒ Object
127
128
129
|
# File 'lib/pve/proxmox.rb', line 127
def fetch predata
__new__( predata).refresh!
end
|
Instance Method Details
#refresh! ⇒ Object
156
157
158
|
# File 'lib/pve/proxmox.rb', line 156
def refresh!
__update__ rest_get( @rest_prefix)
end
|
#respond_to?(method, also_private = false) ⇒ Boolean
132
133
134
|
# File 'lib/pve/proxmox.rb', line 132
def respond_to? method, also_private = false
instance_variable_defined?( "@#{method}") or super(method, also_private)
end
|