Module: Domrobot

Defined in:
lib/domrobot.rb,
lib/domrobot/cli.rb,
lib/domrobot/util.rb,
lib/domrobot/config.rb,
lib/domrobot/address.rb,
lib/domrobot/version.rb,
lib/domrobot/subdomain.rb,
lib/domrobot/types/record.rb,
lib/domrobot/sections/nameserver.rb

Defined Under Namespace

Modules: Address, Sections, Subdomain, Util Classes: Cli, Config, Record

Constant Summary collapse

CONFIG_FILE =
"/etc/domrobot.tml"
VERSION =
"0.1.3"

Class Method Summary collapse

Class Method Details

.loginObject



18
19
20
21
22
# File 'lib/domrobot.rb', line 18

def 
  return @login if @login
  result = robot.(Config.general.username,Config.general.password)
  @login = result["code"] == 1000
end

.nameserverObject



26
27
28
# File 'lib/domrobot.rb', line 26

def nameserver
  Domrobot::Sections::Nameserver
end

.robotObject



15
16
17
# File 'lib/domrobot.rb', line 15

def robot
  @robot ||= INWX::Domrobot.new(Config.general.server)
end

.run(object, method, params) ⇒ Object



23
24
25
# File 'lib/domrobot.rb', line 23

def run object, method, params
  robot.call(object.to_s, method.to_s, Util.stringify_keys(params))
end