lib/ronin/ui/output/output.rb in ronin-support-0.5.1 vs lib/ronin/ui/output/output.rb in ronin-support-0.5.2
- old
+ new
@@ -1,22 +1,22 @@
#
-# Copyright (c) 2006-2012 Hal Brodigan (postmodern.mod3 at gmail.com)
+# Copyright (c) 2006-2021 Hal Brodigan (postmodern.mod3 at gmail.com)
#
-# This file is part of Ronin Support.
+# This file is part of ronin-support.
#
-# Ronin Support is free software: you can redistribute it and/or modify
+# ronin-support is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
-# Ronin Support is distributed in the hope that it will be useful,
+# ronin-support is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
-# along with Ronin Support. If not, see <http://www.gnu.org/licenses/>.
+# along with ronin-support. If not, see <https://www.gnu.org/licenses/>.
#
require 'ronin/ui/output/terminal/raw'
require 'ronin/ui/output/terminal/color'
@@ -24,31 +24,27 @@
module UI
#
# Controls {Output} from Ronin.
#
module Output
- @mode = if ($VERBOSE || $DEBUG)
- :verbose
- else
- :quiet
+ @mode = if ($VERBOSE || $DEBUG) then :verbose
+ else :quiet
end
- @handler = if $stdout.tty?
- Terminal::Color
- else
- Terminal::Raw
+ @handler = if $stdout.tty? then Terminal::Color
+ else Terminal::Raw
end
#
# @return [Boolean]
# Specifies whether verbose output is enabled.
#
# @since 0.3.0
#
# @api semipublic
#
- def Output.verbose?
+ def self.verbose?
@mode == :verbose
end
#
# @return [Boolean]
@@ -56,11 +52,11 @@
#
# @since 0.3.0
#
# @api semipublic
#
- def Output.quiet?
+ def self.quiet?
@mode == :quiet
end
#
# @return [Boolean]
@@ -68,11 +64,11 @@
#
# @since 0.3.0
#
# @api semipublic
#
- def Output.silent?
+ def self.silent?
@mode == :silent
end
#
# Enables verbose output.
@@ -81,11 +77,11 @@
#
# @since 1.0.0
#
# @api semipublic
#
- def Output.verbose!
+ def self.verbose!
@mode = :verbose
return self
end
#
@@ -95,11 +91,11 @@
#
# @since 1.0.0
#
# @api semipublic
#
- def Output.quiet!
+ def self.quiet!
@mode = :quiet
return self
end
#
@@ -107,11 +103,11 @@
#
# @return [Output]
#
# @since 1.0.0
#
- def Output.silent!
+ def self.silent!
@mode = :silent
return self
end
#
@@ -120,11 +116,11 @@
#
# @since 0.3.0
#
# @api semipublic
#
- def Output.handler
+ def self.handler
@handler
end
#
# Sets the current Output handler.
@@ -136,10 +132,10 @@
#
# @since 0.3.0
#
# @api semipublic
#
- def Output.handler=(new_handler)
+ def self.handler=(new_handler)
@handler = new_handler
end
end
end
end