Class: ConvenientService::RSpec::Helpers::Classes::StubService

Inherits:
Support::Command
  • Object
show all
Defined in:
lib/convenient_service/rspec/helpers/classes/stub_service.rb,
lib/convenient_service/rspec/helpers/classes/stub_service/constants.rb,
lib/convenient_service/rspec/helpers/classes/stub_service/entities/result_spec.rb,
lib/convenient_service/rspec/helpers/classes/stub_service/entities/stubbed_service.rb

Defined Under Namespace

Modules: Constants, Entities

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(service_class) ⇒ StubService

Returns a new instance of StubService.



16
17
18
# File 'lib/convenient_service/rspec/helpers/classes/stub_service.rb', line 16

def initialize(service_class)
  @service_class = service_class
end

Instance Attribute Details

#service_classObject (readonly)

Returns the value of attribute service_class.



14
15
16
# File 'lib/convenient_service/rspec/helpers/classes/stub_service.rb', line 14

def service_class
  @service_class
end

Instance Method Details

#callObject



20
21
22
# File 'lib/convenient_service/rspec/helpers/classes/stub_service.rb', line 20

def call
  Entities::StubbedService.new(service_class: @service_class)
end