diff options
Diffstat (limited to 'lib/sisu/v3/help.rb')
-rw-r--r-- | lib/sisu/v3/help.rb | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/sisu/v3/help.rb b/lib/sisu/v3/help.rb index 9ca8ef20..421594fb 100644 --- a/lib/sisu/v3/help.rb +++ b/lib/sisu/v3/help.rb @@ -63,9 +63,9 @@ module SiSU_Help require_relative 'i18n' # i18n.rb def initialize(request='',color='') @request,@color=request,color - if color =~/color_off/; @cX=SiSU_Screen::Ansi.new('k').cX - else @cX=SiSU_Screen::Ansi.new('yes').cX - end + @cX=(color =~/color_off/) \ + ? (SiSU_Screen::Ansi.new('k').cX) + : (SiSU_Screen::Ansi.new('yes').cX) fns='help_example_dummy_file_name.sst' @env=SiSU_Env::InfoEnv.new(fns) @db=SiSU_Env::InfoDb.new @@ -909,9 +909,9 @@ WOK end else bin,rc='false','false' end - if program; "#{@cX.blue}#{program}#{@cX.off} bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}" - else "bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}" - end + (program) \ + ? ("#{@cX.blue}#{program}#{@cX.off} bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}") + : ("bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}") end def sisu_version version=SiSU_Env::InfoVersion.instance.get_version @@ -925,40 +925,40 @@ WOK @ls=leading_spaces=' '*49 @rhost=SiSU_Env::InfoRemoteHost.new.rhost def r1 - if @rhost.r1; @rhost.r1 + "\n" - else '' - end + (@rhost.r1) \ + ? @rhost.r1 + "\n" + : '' end def r2 - if @rhost.r2; @ls + @rhost.r2 + "\n" - else '' - end + (@rhost.r2) \ + ? @ls + @rhost.r2 + "\n" + : '' end def r3 - if @rhost.r3; @ls + @rhost.r3 + "\n" - else '' - end + (@rhost.r3) \ + ? @ls + @rhost.r3 + "\n" + : '' end def r4 - if @rhost.r4; @ls + @rhost.r4 + "\n" - else '' - end + (@rhost.r4) \ + ? @ls + @rhost.r4 + "\n" + : '' end def r5 - if @rhost.r5; @ls + @rhost.r5 + "\n" - else '' - end + (@rhost.r5) \ + ? @ls + @rhost.r5 + "\n" + : '' end def r6 - if @rhost.r6; @ls + @rhost.r6 + "\n" - else '' - end + (@rhost.r6) \ + ? @ls + @rhost.r6 + "\n" + : '' end def note msg='(remote settings user and host set in sisurc.yml under remote:)' - if @rhost.r1; @ls + msg - else msg - end + (@rhost.r1) \ + ? @ls + msg + : msg end self end |