Class: ElastomerClient::Client::RestApiSpec::RestApi

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/elastomer_client/client/rest_api_spec/rest_api.rb

Defined Under Namespace

Classes: Url

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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

#documentationObject (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

#methodsObject (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

#urlObject (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

Returns:

  • (Boolean)


24
25
26
# File 'lib/elastomer_client/client/rest_api_spec/rest_api.rb', line 24

def body?
  !body.nil?
end