Class: BigcommerceTool::Global
- Inherits:
-
GenericLookup
- Object
- GenericLookup
- BigcommerceTool::Global
- Defined in:
- lib/bigcommerce_tool/global.rb
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(config_path, file_load_path) ⇒ Global
constructor
A new instance of Global.
- #lookup(key) ⇒ Object
Methods inherited from GenericLookup
#merge_additional_options, #render_in_div
Constructor Details
#initialize(config_path, file_load_path) ⇒ Global
Returns a new instance of Global.
4 5 6 7 |
# 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 |
Instance Method Details
#code ⇒ Object
17 18 19 |
# File 'lib/bigcommerce_tool/global.rb', line 17 def code "GLOBAL_" end |
#lookup(key) ⇒ Object
9 10 11 12 13 14 15 |
# 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 |