Class: Rots::Mocks::RotsServer
- Inherits:
-
Object
- Object
- Rots::Mocks::RotsServer
- Extended by:
- Forwardable
- Defined in:
- lib/rots/mocks/rots_server.rb
Constant Summary collapse
- SERVER_URL =
"http://localhost:9292"
- DEFAULT_CONFIG =
{ "identity" => "john.doe", "sreg" => { "nickname" => "jdoe", "fullname" => "John Doe", "email" => "[email protected]", "dob" => Date.parse("1985-09-21"), "gender" => "M", }.freeze, }.freeze
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config = nil) ⇒ RotsServer
constructor
A new instance of RotsServer.
Constructor Details
#initialize(config = nil) ⇒ RotsServer
Returns a new instance of RotsServer.
22 23 24 25 26 27 |
# File 'lib/rots/mocks/rots_server.rb', line 22 def initialize(config = nil) @config ||= DEFAULT_CONFIG raise ArgumentError, "config must be a Hash" unless self.config.is_a?(Hash) @app = rack_app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
17 18 19 |
# File 'lib/rots/mocks/rots_server.rb', line 17 def app @app end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
17 18 19 |
# File 'lib/rots/mocks/rots_server.rb', line 17 def config @config end |