Class: Solidus::InstallGenerator::InstallFrontend

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/solidus/install/install_generator/install_frontend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bundler_context:, generator_context:) ⇒ InstallFrontend

Returns a new instance of InstallFrontend.



9
10
11
12
# File 'lib/generators/solidus/install/install_generator/install_frontend.rb', line 9

def initialize(bundler_context:, generator_context:)
  @bundler_context = bundler_context
  @generator_context = generator_context
end

Instance Attribute Details

#bundler_contextObject (readonly)

Returns the value of attribute bundler_context.



6
7
8
# File 'lib/generators/solidus/install/install_generator/install_frontend.rb', line 6

def bundler_context
  @bundler_context
end

#generator_contextObject (readonly)

Returns the value of attribute generator_context.



6
7
8
# File 'lib/generators/solidus/install/install_generator/install_frontend.rb', line 6

def generator_context
  @generator_context
end

Instance Method Details

#call(frontend, installer_adds_auth:) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/generators/solidus/install/install_generator/install_frontend.rb', line 14

def call(frontend, installer_adds_auth:)
  case frontend
  when 'solidus_frontend'
    install_solidus_frontend
  when 'solidus_starter_frontend'
    install_solidus_starter_frontend(installer_adds_auth)
  end
end