Module: Safeconsole
- Defined in:
- lib/safeconsole.rb,
lib/safeconsole/utils.rb,
lib/safeconsole/console.rb,
lib/safeconsole/railtie.rb,
lib/safeconsole/version.rb,
lib/safeconsole/commands.rb,
lib/safeconsole/messages.rb,
lib/safeconsole/pry_config.rb,
lib/safeconsole/configuration.rb,
lib/safeconsole/session_watcher.rb
Defined Under Namespace
Modules: Commands, Messages, Utils
Classes: Configuration, Console, PryConfig, Railtie, SessionWatcher
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Class Method Details
.allow_unsafe? ⇒ Boolean
19
20
21
|
# File 'lib/safeconsole/configuration.rb', line 19
def allow_unsafe?
config.allow_unsafe
end
|
.config ⇒ Object
31
32
33
|
# File 'lib/safeconsole/configuration.rb', line 31
def config
@configuration ||= Configuration.new
end
|
35
36
37
|
# File 'lib/safeconsole/configuration.rb', line 35
def configure
yield config
end
|
.env ⇒ Object
27
28
29
|
# File 'lib/safeconsole/configuration.rb', line 27
def env
config.current_env
end
|
.watch_session? ⇒ Boolean
23
24
25
|
# File 'lib/safeconsole/configuration.rb', line 23
def watch_session?
config.command_timeout.present? || config.session_timeout.present?
end
|