Skip to content

Conversation

@burke
Copy link
Member

@burke burke commented Oct 11, 2018

No description provided.

Copy link
Contributor

@lavoiesl lavoiesl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎩
image

@enable_color = !!bool
end

self.enable_color = $stdout.tty?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather see this defaulted as

def self.enable_color?
  @enable_color ||= $stdout.tty?
end

It seems more idiomatic and in context that way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind. Just realized why that's stupid: if defined?(@enable_color).

@burke burke merged commit c0e697f into master Oct 11, 2018
@burke burke deleted the smart-colour branch October 11, 2018 18:48
@lugray lugray temporarily deployed to production November 9, 2018 18:39 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants