Skip to content

Commit

Permalink
Merge pull request #132 from ruby/use-attr-writer
Browse files Browse the repository at this point in the history
Use attr_writer instead of method definition
  • Loading branch information
hsbt committed May 6, 2016
2 parents d899943 + 1a64729 commit b7a7bfe
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 @@ -34,6 +34,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 @@ -268,11 +271,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 b7a7bfe

Please sign in to comment.