Class: Elastomer::Client::RestApiSpec::RestApi
- Inherits:
-
Object
- Object
- Elastomer::Client::RestApiSpec::RestApi
- Extended by:
- Forwardable
- Defined in:
- lib/elastomer/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.
15 16 17 18 19 20 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 15 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.
10 11 12 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 10 def body @body end |
#documentation ⇒ Object (readonly)
Returns the value of attribute documentation.
7 8 9 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 7 def documentation @documentation end |
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
8 9 10 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 8 def methods @methods end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 9 def url @url end |
Instance Method Details
#body? ⇒ Boolean
22 23 24 |
# File 'lib/elastomer/client/rest_api_spec/rest_api.rb', line 22 def body? !body.nil? end |