Class: ShopifyCLI::Services::App::ConnectService
- Inherits:
-
BaseService
- Object
- BaseService
- ShopifyCLI::Services::App::ConnectService
- Defined in:
- lib/shopify_cli/services/app/connect_service.rb
Instance Attribute Summary collapse
-
#app_type ⇒ Object
readonly
Returns the value of attribute app_type.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(app_type:, project:, context:) ⇒ ConnectService
constructor
A new instance of ConnectService.
Methods inherited from BaseService
Constructor Details
#initialize(app_type:, project:, context:) ⇒ ConnectService
Returns a new instance of ConnectService.
7 8 9 10 11 12 |
# File 'lib/shopify_cli/services/app/connect_service.rb', line 7 def initialize(app_type:, project:, context:) @app_type = app_type @project = project @context = context super() end |
Instance Attribute Details
#app_type ⇒ Object (readonly)
Returns the value of attribute app_type.
5 6 7 |
# File 'lib/shopify_cli/services/app/connect_service.rb', line 5 def app_type @app_type end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/shopify_cli/services/app/connect_service.rb', line 5 def context @context end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'lib/shopify_cli/services/app/connect_service.rb', line 5 def project @project end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/shopify_cli/services/app/connect_service.rb', line 14 def call unless project&.env.nil? context.puts(context.("core.app.connect.production_warning")) end app = ShopifyCLI::Connect.new(context).default_connect(app_type.to_s) context.done(context.("core.app.connect.connected", app)) end |