module DatGretel
Constants
- VERSION
Attributes
reload_environments[W]
Sets the Rails environment names with automatic configuration reload. Default is +[“development”]+.
Public Class Methods
configure() { |self| ... }
click to toggle source
Yields this Gretel
to be configured.
Gretel.configure do |config| config.reload_environments << "staging" end
# File lib/dat_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/dat_gretel.rb, line 64 def register_style(style, options) DatGretel::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/dat_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/dat_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/dat_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/dat_gretel.rb, line 39 def suppress_deprecation_warnings? !!@suppress_deprecation_warnings if defined? @suppress_deprecation_warnings end