Class: Flor::Tools::ShellOut

Inherits:
Object
  • Object
show all
Defined in:
lib/flor/tools/shell_out.rb

Instance Method Summary collapse

Constructor Details

#initialize(unit) ⇒ ShellOut

Returns a new instance of ShellOut.



7
8
9
10
11
12
13
14
# File 'lib/flor/tools/shell_out.rb', line 7

def initialize(unit)

  @file = File.open('.log.txt', 'ab')
  @file.sync = true

  #@unit.conf['fls_file']
  #@unit.conf['fls_file_mode']
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



27
28
29
# File 'lib/flor/tools/shell_out.rb', line 27

def method_missing(*args)
p [ 'MISSING>>>', args ]
end

Instance Method Details

#puts(s) ⇒ Object



21
22
23
24
25
# File 'lib/flor/tools/shell_out.rb', line 21

def puts(s)

  $stdout.puts(s)
  @file.puts(s)
end

#tty?Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/flor/tools/shell_out.rb', line 16

def tty?

  $stdout.tty?
end