Class: OvirtSDK4::Dns
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ Dns
constructor
Creates a new instance of the Dns class.
-
#search_domains ⇒ Array<Host>
Returns the value of the
search_domains
attribute. -
#search_domains=(list) ⇒ Object
Sets the value of the
search_domains
attribute. -
#servers ⇒ Array<Host>
Returns the value of the
servers
attribute. -
#servers=(list) ⇒ Object
Sets the value of the
servers
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Dns
Creates a new instance of the OvirtSDK4::Dns class.
3277 3278 3279 3280 3281 |
# File 'lib/ovirtsdk4/types.rb', line 3277 def initialize(opts = {}) super(opts) self.search_domains = opts[:search_domains] self.servers = opts[:servers] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
3286 3287 3288 3289 3290 |
# File 'lib/ovirtsdk4/types.rb', line 3286 def ==(other) super && @search_domains == other.search_domains && @servers == other.servers end |
#hash ⇒ Object
Generates a hash value for this object.
3295 3296 3297 3298 3299 |
# File 'lib/ovirtsdk4/types.rb', line 3295 def hash super + @search_domains.hash + @servers.hash end |
#search_domains ⇒ Array<Host>
Returns the value of the search_domains
attribute.
3218 3219 3220 |
# File 'lib/ovirtsdk4/types.rb', line 3218 def search_domains @search_domains end |
#search_domains=(list) ⇒ Object
Sets the value of the search_domains
attribute.
3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 |
# File 'lib/ovirtsdk4/types.rb', line 3227 def search_domains=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @search_domains = list end |
#servers ⇒ Array<Host>
Returns the value of the servers
attribute.
3244 3245 3246 |
# File 'lib/ovirtsdk4/types.rb', line 3244 def servers @servers end |
#servers=(list) ⇒ Object
Sets the value of the servers
attribute.
3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 |
# File 'lib/ovirtsdk4/types.rb', line 3253 def servers=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Host.new(value) end end end @servers = list end |