Class: G

Inherits:
Object
  • Object
show all
Defined in:
lib/cuco/cuco.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/cuco/cuco.rb', line 5

def options
  @options
end

.pwdObject

Returns the value of attribute pwd.



6
7
8
# File 'lib/cuco/cuco.rb', line 6

def pwd
  @pwd
end

.pwd_lengthObject

Returns the value of attribute pwd_length.



7
8
9
# File 'lib/cuco/cuco.rb', line 7

def pwd_length
  @pwd_length
end

.scriptObject

Returns the value of attribute script.



8
9
10
# File 'lib/cuco/cuco.rb', line 8

def script
  @script
end

.scriptnameObject

Returns the value of attribute scriptname.



9
10
11
# File 'lib/cuco/cuco.rb', line 9

def scriptname
  @scriptname
end

Class Method Details

.init(options, argv) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/cuco/cuco.rb', line 11

def init(options, argv)
  @options = options
  @scriptname = File.expand_path(argv.first || ".watchr")
  @pwd = Dir.pwd
  @pwd_length = @pwd.length

  puts "*** Cuco starts at #{Time.now}" if @options[:debug]
  print if @options[:debug]
end


21
22
23
24
25
26
27
# File 'lib/cuco/cuco.rb', line 21

def print
  puts "*** options #{@options}"
  puts "*** pwd     <#{@pwd}>"
  puts "*** pwd_length <#{@pwd_length}>"
  puts "*** scriptname <#{@scriptname}>"
  puts "*** script  <#{@script}>"
end