module Hanami::Extensions::View::Part

@api public @since 2.1.0

Public Class Methods

included(part_class) click to toggle source

@api private @since 2.1.0

Calls superclass method
# File lib/hanami/extensions/view/part.rb, line 11
def self.included(part_class)
  super

  part_class.extend(Hanami::SliceConfigurable)
  part_class.extend(ClassMethods)
end

Public Instance Methods

helpers() click to toggle source

Returns an object including the default Hanami helpers as well as the user-defined helpers for the part’s slice.

Use this when you need to access helpers inside your part classes.

@return [Object] the helpers object

@api public @since 2.1.0

# File lib/hanami/extensions/view/part.rb, line 41
def helpers
  @helpers ||= self.class.const_get(:PartHelpers).new(context: _context)
end