Class: ShopifyCLI::Services::App::OpenService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/shopify_cli/services/app/open_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseService

call

Constructor Details

#initialize(project:, context:) ⇒ OpenService

Returns a new instance of OpenService.



7
8
9
10
11
# File 'lib/shopify_cli/services/app/open_service.rb', line 7

def initialize(project:, context:)
  @project = project
  @context = context
  super()
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/shopify_cli/services/app/open_service.rb', line 5

def context
  @context
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'lib/shopify_cli/services/app/open_service.rb', line 5

def project
  @project
end

Instance Method Details

#callObject



13
14
15
# File 'lib/shopify_cli/services/app/open_service.rb', line 13

def call
  context.open_url!("#{project.env.host}/login?shop=#{project.env.shop}")
end