class Guard::Jobs::TerminalSettings

Public Class Methods

new() click to toggle source
# File lib/guard/jobs/pry_wrapper.rb, line 15
def initialize
  @settings = nil
  @works = Shellany::Sheller.run("hash", "stty") || false
end

Public Instance Methods

configurable?() click to toggle source
# File lib/guard/jobs/pry_wrapper.rb, line 35
def configurable?
  @works
end
echo() click to toggle source
# File lib/guard/jobs/pry_wrapper.rb, line 30
def echo
  return unless configurable?
  Shellany::Sheller.run("stty echo 2>#{IO::NULL}")
end
restore() click to toggle source
# File lib/guard/jobs/pry_wrapper.rb, line 20
def restore
  return unless configurable? && @settings
  Shellany::Sheller.run("stty #{ @setting } 2>#{IO::NULL}")
end
save() click to toggle source
# File lib/guard/jobs/pry_wrapper.rb, line 25
def save
  return unless configurable?
  @settings = Shellany::Sheller.stdout("stty -g 2>#{IO::NULL}").chomp
end