Class: Puppeteer::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/env.rb

Instance Method Summary collapse

Instance Method Details

#ci?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/puppeteer/env.rb', line 9

def ci?
  ['1', 'true'].include?(ENV['CI'].to_s)
end

#darwin?Boolean

check if running on macOS

Returns:

  • (Boolean)


14
15
16
# File 'lib/puppeteer/env.rb', line 14

def darwin?
  RUBY_PLATFORM.include?('darwin')
end

#debug?Boolean

indicates whether DEBUG=1 is specified.

Returns:

  • (Boolean)


5
6
7
# File 'lib/puppeteer/env.rb', line 5

def debug?
  ['1', 'true'].include?(ENV['DEBUG'].to_s)
end