Sha256: a4a315ac28341e77353f98b4022867a36a2d5883a6c47f275000748059da4f5e
Contents?: true
Size: 682 Bytes
Versions: 1
Compression:
Stored size: 682 Bytes
Contents
module Safeconsole class Configuration attr_accessor :app_name, :allow_unsafe, :current_env, :environments, :command_timeout, :session_timeout def initialize @environments = %w[] @app_name = Utils.get_app_name @allow_unsafe = true @current_env = Rails.env end end class << self def allow_unsafe? config.allow_unsafe end def watch_session? config.command_timeout.present? || config.session_timeout.present? end def env config.current_env end def config @configuration ||= Configuration.new end def configure yield config end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
safeconsole-1.0.0 | lib/safeconsole/configuration.rb |