Module: Plymouth

Defined in:
lib/plymouth.rb,
lib/plymouth/version.rb,
lib/plymouth/commands.rb

Constant Summary collapse

VERSION =
"0.3.3"
Commands =
Pry::CommandSet.new do
  create_command "plymouth-off", "Disable Plymouth." do
    banner <<-BANNER
      Usage: plymouth-off
      Exit the REPL and turn Plymouth off for the duration of the test suite.
    BANNER

    def process
      Plymouth.disable!

      # exit the REPL
      run "exit-all"
    end
  end

  create_command "plymouth-on", "Enable Plymouth." do
    banner <<-BANNER
      Usage: plymouth-on
      Enable Plymouth.
    BANNER

    def process
      Plymouth.enable!
    end
  end
end

Class Method Summary collapse

Class Method Details

.disable!Boolean

Disable plymouth.

Returns:

  • (Boolean)


18
19
20
# File 'lib/plymouth.rb', line 18

def self.disable!
  ::EE.enabled = false
end

.enable!Boolean

Enable plymouth.

Returns:

  • (Boolean)


12
13
14
# File 'lib/plymouth.rb', line 12

def self.enable!
  ::EE.enabled = true
end

.enabled?Boolean

Returns Whether Plymouth is enabled.

Returns:

  • (Boolean)

    Whether Plymouth is enabled.



23
24
25
# File 'lib/plymouth.rb', line 23

def self.enabled?
  ::EE.enabled?
end