Class: NicInfo::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/nicinfo/factory.rb

Overview

Creates objects we want to mock

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Factory

Returns a new instance of Factory.



22
23
24
# File 'lib/nicinfo/factory.rb', line 22

def initialize( config )
  @config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



20
21
22
# File 'lib/nicinfo/factory.rb', line 20

def config
  @config
end

Instance Method Details

#new_autnumObject



30
31
32
# File 'lib/nicinfo/factory.rb', line 30

def new_autnum
  return Autnum.new( config )
end

#new_domainObject



34
35
36
# File 'lib/nicinfo/factory.rb', line 34

def new_domain
  return Domain.new( config )
end

#new_entityObject



38
39
40
# File 'lib/nicinfo/factory.rb', line 38

def new_entity
  return Entity.new( config )
end

#new_error_codeObject



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

def new_error_code
  return ErrorCode.new( config )
end

#new_ipObject



42
43
44
# File 'lib/nicinfo/factory.rb', line 42

def new_ip
  return Ip.new( config )
end

#new_noticesObject



46
47
48
# File 'lib/nicinfo/factory.rb', line 46

def new_notices
  return Notices.new( config )
end

#new_nsObject



50
51
52
# File 'lib/nicinfo/factory.rb', line 50

def new_ns
  return Ns.new( config )
end