Class: ElastomerClient::Client::RestApiSpec::RestApi
- Inherits:
-
Object
- Object
- ElastomerClient::Client::RestApiSpec::RestApi
- Extended by:
- Forwardable
- Defined in:
- lib/elastomer_client/client/rest_api_spec/rest_api.rb
Defined Under Namespace
Classes: Url
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#documentation ⇒ Object
readonly
Returns the value of attribute documentation.
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #body? ⇒ Boolean
-
#initialize(documentation:, methods:, url:, body: nil) ⇒ RestApi
constructor
A new instance of RestApi.
Constructor Details
#initialize(documentation:, methods:, url:, body: nil) ⇒ RestApi
Returns a new instance of RestApi.
17 18 19 20 21 22 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 17 def initialize(documentation:, methods:, url:, body: nil) @documentation = documentation @methods = Array(methods) @url = Url.new(**url) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 12 def body @body end |
#documentation ⇒ Object (readonly)
Returns the value of attribute documentation.
9 10 11 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 9 def documentation @documentation end |
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
10 11 12 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 10 def methods @methods end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 11 def url @url end |
Instance Method Details
#body? ⇒ Boolean
24 25 26 |
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 24 def body? !body.nil? end |