Module: Extension::Messages::MessageLoading
- Defined in:
- lib/project_types/extension/messages/message_loading.rb
Class Method Summary collapse
Class Method Details
.load ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/project_types/extension/messages/message_loading.rb', line 6 def self.load = return Messages::MESSAGES if .nil? if .key?(:overrides) ShopifyCLI::Utilities.deep_merge(Messages::MESSAGES, [:overrides]) else Messages::MESSAGES end end |
.load_current_type_messages ⇒ Object
17 18 19 20 21 22 |
# File 'lib/project_types/extension/messages/message_loading.rb', line 17 def self. return unless ShopifyCLI::Project.has_current? ( ShopifyCLI::Project.current.config[Extension::ExtensionProjectKeys::SPECIFICATION_IDENTIFIER_KEY] ) end |
.messages_for_type(type_identifier) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/project_types/extension/messages/message_loading.rb', line 24 def self.(type_identifier) return if type_identifier.nil? type_identifier_symbol = type_identifier.downcase.to_sym return unless Messages::TYPES.key?(type_identifier_symbol) TYPES[type_identifier_symbol] end |