lib/messages_dictionary.rb in messages_dictionary-1.0.0 vs lib/messages_dictionary.rb in messages_dictionary-2.0.0

- old
+ new

@@ -1,10 +1,26 @@ +# frozen_string_literal: true + require 'yaml' require 'hashie' +require 'zeitwerk' -require_relative 'messages_dictionary/utils/snake_case' -require_relative 'messages_dictionary/utils/dict' -require_relative 'messages_dictionary/injector' +loader = Zeitwerk::Loader.for_gem +loader.setup +# Store your messages anywhere and fetch them anytime. +# For example: +# +# class MyClass +# include MessagesDictionary +# has_messages_dictionary + +# def calculate(a) +# result = a ** 2 +# pretty_output(:show_result, result: result) +# end +# end module MessagesDictionary + def self.included(klass) + klass.include MessagesDictionary::Injector + end end -