Class: Middleman::CoreExtensions::DefaultHelpers

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

Constant Summary

Constants included from Contracts

Contracts::PATH_MATCHER, Contracts::ResourceList, Contracts::VectorOf

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



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'middleman-core/lib/middleman-core/core_extensions/default_helpers.rb', line 23

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