module Gretel

Constants

VERSION

Attributes

reload_environments[W]

Sets the Rails environment names with automatic configuration reload. Default is +[“development”]+.

Public Class Methods

breadcrumb_paths() click to toggle source

Returns the path from with breadcrumbs are loaded. Default is config/breadcrumbs.rb in the app and all loaded engines. Breadcrumbs set in the app will override breadcrumbs set in engines.

breadcrumb_paths=(paths) click to toggle source

Sets the path from with breadcrumbs are loaded. Default is config/breadcrumbs.rb.

configure() { |self| ... } click to toggle source

Yields this Gretel to be configured.

Gretel.configure do |config|
  config.reload_environments << "staging"
end
# File lib/gretel.rb, line 76
def configure
  yield self
end
register_style(style, options) click to toggle source

Registers a style for later use.

Gretel.register_style :ul, { container_tag: :ul, fragment_tag: :li }
# File lib/gretel.rb, line 64
def register_style(style, options)
  Gretel::Renderer.register_style style, options
end
reload_environments() click to toggle source

Array of Rails environment names with automatic configuration reload. Default is +[“development”]+.

# File lib/gretel.rb, line 57
def reload_environments
  @reload_environments ||= ["development"]
end
show_deprecation_warning(message) click to toggle source

Shows a deprecation warning.

# File lib/gretel.rb, line 49
def show_deprecation_warning(message)
  return if suppress_deprecation_warnings?
  message = "[Gretel] #{message}"
  puts message
  Rails.logger.warn message
end
suppress_deprecation_warnings=(value) click to toggle source

Sets whether to suppress deprecation warnings.

# File lib/gretel.rb, line 44
def suppress_deprecation_warnings=(value)
  @suppress_deprecation_warnings = value
end
suppress_deprecation_warnings?() click to toggle source

Whether to suppress deprecation warnings.

# File lib/gretel.rb, line 39
def suppress_deprecation_warnings?
  !!@suppress_deprecation_warnings
end