Class: ShopifyCLI::Theme::DevServer::ProxyParamBuilder
- Inherits:
-
Object
- Object
- ShopifyCLI::Theme::DevServer::ProxyParamBuilder
- Defined in:
- lib/shopify_cli/theme/dev_server/proxy_param_builder.rb
Instance Method Summary collapse
- #build ⇒ Object
- #with_core_endpoints(core_endpoints) ⇒ Object
- #with_rack_env(rack_env) ⇒ Object
- #with_syncer(syncer) ⇒ Object
- #with_theme(theme) ⇒ Object
Instance Method Details
#build ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shopify_cli/theme/dev_server/proxy_param_builder.rb', line 9 def build # Core doesn't support replace_templates return {} if core?(current_path) (syncer_templates + request_templates) .select { |file| file.liquid? || file.json? } .uniq(&:relative_path) .map { |file| as_param(file) } .to_h end |
#with_core_endpoints(core_endpoints) ⇒ Object
20 21 22 23 |
# File 'lib/shopify_cli/theme/dev_server/proxy_param_builder.rb', line 20 def with_core_endpoints(core_endpoints) @core_endpoints = core_endpoints self end |
#with_rack_env(rack_env) ⇒ Object
30 31 32 33 |
# File 'lib/shopify_cli/theme/dev_server/proxy_param_builder.rb', line 30 def with_rack_env(rack_env) @rack_env = rack_env self end |
#with_syncer(syncer) ⇒ Object
25 26 27 28 |
# File 'lib/shopify_cli/theme/dev_server/proxy_param_builder.rb', line 25 def with_syncer(syncer) @syncer = syncer self end |
#with_theme(theme) ⇒ Object
35 36 37 38 |
# File 'lib/shopify_cli/theme/dev_server/proxy_param_builder.rb', line 35 def with_theme(theme) @theme = theme self end |