Class: Middleman::CoreExtensions::DefaultHelpers

Inherits:
Extension
  • Object
show all
Defined in:
lib/middleman-core/core_extensions/default_helpers.rb

Constant Summary

Constants included from Contracts

Contracts::PATH_MATCHER

Instance Attribute Summary

Attributes inherited from Extension

#app, #options

Instance Method Summary collapse

Methods inherited from Extension

activated_extension, #add_exposed_to_context, #after_build, #after_configuration, #after_extension_activated, after_extension_activated, #before_build, #before_configuration, clear_after_extension_callbacks, config, define_setting, expose_to_application, expose_to_config, expose_to_template, global_config, helpers, #manipulate_resource_list, option, #ready, resources

Methods included from Contracts

#Contract

Constructor Details

#initialize(app, options_hash = {}, &block) ⇒ DefaultHelpers

Returns a new instance of DefaultHelpers.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/middleman-core/core_extensions/default_helpers.rb', line 31

def initialize(app, options_hash={}, &block)
  super

  require 'active_support/core_ext/object/to_query'

  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::OutputHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::TagHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::AssetTagHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::FormHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::FormatHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::RenderHelpers
  ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::NumberHelpers
  # ::Middleman::TemplateContext.send :include, ::Padrino::Helpers::TranslationHelpers
end