Class: Fuubar::Output

Inherits:
Delegator
  • Object
show all
Defined in:
lib/fuubar/output.rb

Instance Method Summary collapse

Constructor Details

#initialize(output, force_tty = false) ⇒ Output

Returns a new instance of Output.



7
8
9
10
# File 'lib/fuubar/output.rb', line 7

def initialize(output, force_tty = false)
  @raw_output = output
  @force_tty  = force_tty
end

Instance Method Details

#__getobj__Object



12
13
14
# File 'lib/fuubar/output.rb', line 12

def __getobj__
  @raw_output
end

#tty?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/fuubar/output.rb', line 16

def tty?
  @force_tty || @raw_output.tty?
end