Skip to content

Commit

Permalink
use attr_writer instead of method definition
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed May 6, 2016
1 parent c5197ee commit 1a64729
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/rake/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class Application
# List of the top level task names (task names from the command line).
attr_reader :top_level_tasks

# Override the detected TTY output state (mostly for testing)
attr_writer :tty_output

DEFAULT_RAKEFILES = [
'rakefile',
'Rakefile',
Expand Down Expand Up @@ -269,11 +272,6 @@ def tty_output? # :nodoc:
@tty_output
end

# Override the detected TTY output state (mostly for testing)
def tty_output=(tty_output_state) # :nodoc:
@tty_output = tty_output_state
end

# We will truncate output if we are outputting to a TTY or if we've been
# given an explicit column width to honor
def truncate_output? # :nodoc:
Expand Down

0 comments on commit 1a64729

Please sign in to comment.