Class: NicInfo::Factory
- Inherits:
-
Object
- Object
- NicInfo::Factory
- Defined in:
- lib/nicinfo/factory.rb
Overview
Creates objects we want to mock
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Factory
constructor
A new instance of Factory.
- #new_autnum ⇒ Object
- #new_domain ⇒ Object
- #new_entity ⇒ Object
- #new_error_code ⇒ Object
- #new_ip ⇒ Object
- #new_notices ⇒ Object
- #new_ns ⇒ Object
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
#config ⇒ Object
Returns the value of attribute config.
20 21 22 |
# File 'lib/nicinfo/factory.rb', line 20 def config @config end |
Instance Method Details
#new_autnum ⇒ Object
30 31 32 |
# File 'lib/nicinfo/factory.rb', line 30 def new_autnum return Autnum.new( config ) end |
#new_domain ⇒ Object
34 35 36 |
# File 'lib/nicinfo/factory.rb', line 34 def new_domain return Domain.new( config ) end |
#new_entity ⇒ Object
38 39 40 |
# File 'lib/nicinfo/factory.rb', line 38 def new_entity return Entity.new( config ) end |
#new_error_code ⇒ Object
26 27 28 |
# File 'lib/nicinfo/factory.rb', line 26 def new_error_code return ErrorCode.new( config ) end |
#new_ip ⇒ Object
42 43 44 |
# File 'lib/nicinfo/factory.rb', line 42 def new_ip return Ip.new( config ) end |
#new_notices ⇒ Object
46 47 48 |
# File 'lib/nicinfo/factory.rb', line 46 def new_notices return Notices.new( config ) end |
#new_ns ⇒ Object
50 51 52 |
# File 'lib/nicinfo/factory.rb', line 50 def new_ns return Ns.new( config ) end |