Class: Sink::Resources::DecoratorTests

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/decorator_tests.rb,
lib/sink/resources/decorator_tests/languages.rb,
lib/sink/resources/decorator_tests/keep_this_resource.rb,
lib/sink/resources/decorator_tests/skip_this_resource.rb

Defined Under Namespace

Classes: KeepThisResource, Languages, SkipThisResource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DecoratorTests

Returns a new instance of DecoratorTests.

Parameters:



16
17
18
19
20
21
# File 'lib/sink/resources/decorator_tests.rb', line 16

def initialize(client:)
  @client = client
  @languages = Sink::Resources::DecoratorTests::Languages.new(client: client)
  @keep_this_resource = Sink::Resources::DecoratorTests::KeepThisResource.new(client: client)
  @skip_this_resource = Sink::Resources::DecoratorTests::SkipThisResource.new(client: client)
end

Instance Attribute Details

#keep_this_resourceSink::Resources::DecoratorTests::KeepThisResource (readonly)



10
11
12
# File 'lib/sink/resources/decorator_tests.rb', line 10

def keep_this_resource
  @keep_this_resource
end

#languagesSink::Resources::DecoratorTests::Languages (readonly)



7
8
9
# File 'lib/sink/resources/decorator_tests.rb', line 7

def languages
  @languages
end

#skip_this_resourceSink::Resources::DecoratorTests::SkipThisResource (readonly)



13
14
15
# File 'lib/sink/resources/decorator_tests.rb', line 13

def skip_this_resource
  @skip_this_resource
end

Instance Method Details

#keep_me(opts = {}) ⇒ Sink::Models::DecoratorTestKeepMeResponse

Top-level method that should not be skipped.

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



28
29
30
31
32
33
34
35
# File 'lib/sink/resources/decorator_tests.rb', line 28

def keep_me(opts = {})
  req = {
    method: :get,
    path: "/decorator_tests/keep/me",
    model: Sink::Models::DecoratorTestKeepMeResponse
  }
  @client.request(req, opts)
end