Module: HMote::Helpers
- Defined in:
- lib/hmote.rb
Instance Method Summary collapse
Instance Method Details
#hmote(file, params = {}, context = self) ⇒ Object
63 64 65 66 |
# File 'lib/hmote.rb', line 63 def hmote(file, params = {}, context = self) hmote_cache[file] ||= HMote.parse(File.read(file), context, params.keys) hmote_cache[file].call(params) end |
#hmote_cache ⇒ Object
68 69 70 |
# File 'lib/hmote.rb', line 68 def hmote_cache Thread.current[:_hmote_cache] ||= {} end |