Class: Roebe::InstallFluxboxStyle

Inherits:
Object
  • Object
show all
Includes:
FileUtils::Verbose
Defined in:
lib/roebe/classes/fluxbox/install_fluxbox_style.rb

Overview

Roebe::InstallFluxboxStyle

Constant Summary collapse

SYSTEM_STYLES =
#

SYSTEM_STYLES

#
'/usr/share/fluxbox/styles/'
USER_STYLES_DIRECTORY =
#

USER_STYLES_DIRECTORY

#
File.expand_path('~/.fluxbox/styles/')

Instance Method Summary collapse

Constructor Details

#initialize(i = nil, run_already = true) ⇒ InstallFluxboxStyle

#

initialize

#


38
39
40
41
42
43
44
45
# File 'lib/roebe/classes/fluxbox/install_fluxbox_style.rb', line 38

def initialize(
    i           = nil,
    run_already = true
  )
  reset
  set_input(i)
  run if run_already
end

Instance Method Details

#resetObject

#

reset (reset tag)

#


50
51
52
# File 'lib/roebe/classes/fluxbox/install_fluxbox_style.rb', line 50

def reset
  infer_the_namespace
end

#runObject

#

run (run tag)

#


77
78
79
# File 'lib/roebe/classes/fluxbox/install_fluxbox_style.rb', line 77

def run
  run_everything
end

#run_everythingObject

#

run_everything

#


66
67
68
69
70
71
72
# File 'lib/roebe/classes/fluxbox/install_fluxbox_style.rb', line 66

def run_everything
  opne "Now installing this fluxbox style: "\
       "#{simp(@input.delete(')'))}"
  opne 'into '+sdir(SYSTEM_STYLES)
  cp_r(@input, SYSTEM_STYLES)
  cp_r(@input, USER_STYLES_DIRECTORY)
end

#set_input(i = '') ⇒ Object

#

set_input

#


57
58
59
60
61
# File 'lib/roebe/classes/fluxbox/install_fluxbox_style.rb', line 57

def set_input(i = '')
  i = i.first if i.is_a? Array
  i = i.to_s.dup if i
  @input = i
end