Class: Cfan122::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/cfan122/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
# File 'lib/cfan122/config.rb', line 10

def initialize
  reset
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



8
9
10
# File 'lib/cfan122/config.rb', line 8

def domain
  @domain
end

#passwordObject

Returns the value of attribute password.



8
9
10
# File 'lib/cfan122/config.rb', line 8

def password
  @password
end

#timeoutObject

Returns the value of attribute timeout.



8
9
10
# File 'lib/cfan122/config.rb', line 8

def timeout
  @timeout
end

#usernameObject

Returns the value of attribute username.



8
9
10
# File 'lib/cfan122/config.rb', line 8

def username
  @username
end

Instance Method Details

#resetObject



14
15
16
17
18
# File 'lib/cfan122/config.rb', line 14

def reset
  @domain ||= 'http://www.122.gov.cn'
  @username = nil
  @password = nil
end