Class: Apiwork::Introspection::API::Info::Server
- Inherits:
-
Object
- Object
- Apiwork::Introspection::API::Info::Server
- Defined in:
- lib/apiwork/introspection/api/info/server.rb
Overview
Wraps API server information.
Instance Method Summary collapse
-
#description ⇒ String?
The server description.
-
#initialize(dump) ⇒ Server
constructor
A new instance of Server.
-
#to_h ⇒ Hash
Converts this server to a hash.
-
#url ⇒ String?
The server URL.
Constructor Details
#initialize(dump) ⇒ Server
Returns a new instance of Server.
16 17 18 |
# File 'lib/apiwork/introspection/api/info/server.rb', line 16 def initialize(dump) @dump = dump end |
Instance Method Details
#description ⇒ String?
The server description.
32 33 34 |
# File 'lib/apiwork/introspection/api/info/server.rb', line 32 def description @dump[:description] end |
#to_h ⇒ Hash
Converts this server to a hash.
40 41 42 43 44 45 |
# File 'lib/apiwork/introspection/api/info/server.rb', line 40 def to_h { description: description, url: url, } end |
#url ⇒ String?
The server URL.
24 25 26 |
# File 'lib/apiwork/introspection/api/info/server.rb', line 24 def url @dump[:url] end |