Class: Gapic::Presenters::WrapperServiceRestPresenter

Inherits:
ServiceRestPresenter
  • Object
show all
Defined in:
lib/gapic/presenters/wrapper_service_rest_presenter.rb

Overview

A presenter for wrapper services.

Instance Method Summary collapse

Instance Method Details

#configure_client_callObject



40
41
42
# File 'lib/gapic/presenters/wrapper_service_rest_presenter.rb', line 40

def configure_client_call
  "#{main_service.gem.namespace}.configure"
end

#create_client_callObject



36
37
38
# File 'lib/gapic/presenters/wrapper_service_rest_presenter.rb', line 36

def create_client_call
  "#{main_service.gem.namespace}.#{factory_method_name}"
end

#credentials_class_xrefObject



44
45
46
# File 'lib/gapic/presenters/wrapper_service_rest_presenter.rb', line 44

def credentials_class_xref
  "`#{main_service.credentials_name_full}`"
end

#factory_method_nameObject



26
27
28
29
30
31
32
33
34
# File 'lib/gapic/presenters/wrapper_service_rest_presenter.rb', line 26

def factory_method_name
  @factory_method_name ||= begin
    method_name = ActiveSupport::Inflector.underscore main_service.name
    suffix = main_service.gem.factory_method_suffix
    method_name = "#{method_name}#{suffix}" unless method_name.end_with? suffix
    method_name = "#{method_name}_client" if Gapic::RubyInfo.excluded_method_names.include? method_name
    method_name
  end
end