class BigcommerceTool::Global
Public Class Methods
new(config_path, file_load_path)
click to toggle source
Calls superclass method
GenericLookup::new
# File lib/bigcommerce_tool/global.rb, line 4 def initialize(config_path, file_load_path) @file_load_path = file_load_path super(config_path) end
Public Instance Methods
code()
click to toggle source
# File lib/bigcommerce_tool/global.rb, line 17 def code "GLOBAL_" end
lookup(key)
click to toggle source
Calls superclass method
GenericLookup#lookup
# File lib/bigcommerce_tool/global.rb, line 9 def lookup(key) unless @translations[key].to_s.match(/From File/) super(key) else load_from_file(key) end end
Private Instance Methods
load_from_file(key)
click to toggle source
# File lib/bigcommerce_tool/global.rb, line 23 def load_from_file(key) File.open(File.join(Dir.pwd, @file_load_path, "#{key}.html") , "rb").read end