Class: Lumberg::Whm::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/lumberg/whm/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Required

* <tt>:server</tt> - PENDING

10
11
12
# File 'lib/lumberg/whm/base.rb', line 10

def initialize(options = {})
  @server = setup_server options.delete(:server)
end

Instance Attribute Details

#serverObject

Whm::Server


5
6
7
# File 'lib/lumberg/whm/base.rb', line 5

def server
  @server
end

Instance Method Details

#setup_server(value) ⇒ Object


14
15
16
17
18
19
20
# File 'lib/lumberg/whm/base.rb', line 14

def setup_server(value)
  if value.is_a?(Whm::Server)
    value
  else
    Whm::Server.new value
  end
end