class Bashly::MessageStrings
Public Instance Methods
[](key)
click to toggle source
# File lib/bashly/message_strings.rb, line 5 def [](key) values[key.to_s] end
values()
click to toggle source
# File lib/bashly/message_strings.rb, line 9 def values @values ||= values! end
Private Instance Methods
project_strings()
click to toggle source
# File lib/bashly/message_strings.rb, line 20 def project_strings @project_strings ||= project_strings! end
project_strings!()
click to toggle source
# File lib/bashly/message_strings.rb, line 24 def project_strings! if File.exist? project_strings_path YAML.load_file project_strings_path else {} end end
project_strings_path()
click to toggle source
# File lib/bashly/message_strings.rb, line 32 def project_strings_path @project_strings_path ||= "#{Settings.source_dir}/bashly-strings.yml" end
values!()
click to toggle source
# File lib/bashly/message_strings.rb, line 15 def values! defaults = YAML.load_file asset("templates/strings.yml") defaults.merge project_strings end