class Middleman::Extension
def expose_to_template(*symbols)
-
(void)
-
Parameters:
-
symbols
(Array
) -- An optional list of symbols representing instance methods to exposed., Hash
Other tags:
- Example: with Array: -
Example: with Hash: -
def expose_to_template(*symbols) self.exposed_to_template ||= {} if symbols.first && symbols.first.is_a?(Hash) self.exposed_to_template.merge!(symbols.first) elsif symbols.is_a? Array symbols.each do |sym| self.exposed_to_template[sym] = sym end end end