Top Level Namespace

Defined Under Namespace

Modules: FFI_Yajl Classes: Array, Bignum, Date, DateTime, FalseClass, Fixnum, Float, Hash, Integer, NilClass, Object, String, StringIO, Symbol, Time, TrueClass

Constant Summary collapse

HEADER_DIRS =
[
  "/opt/local/include",                   # MacPorts
  "/usr/local/include",                   # /usr/local
  RbConfig::CONFIG["includedir"],         # Ruby
  "/usr/include",                         # (default)
].freeze
LIB_DIRS =
[
  "/opt/local/lib",                       # MacPorts
  "/usr/local/lib",                       # /usr/local + Homebrew
  RbConfig::CONFIG["libdir"],             # Ruby
  "/usr/lib",                             # (default)
].freeze

Instance Method Summary collapse

Instance Method Details

#clang?Boolean

Returns:

  • (Boolean)


34
35
36
37
# File 'ext/ffi_yajl/ext/parser/extconf.rb', line 34

def clang?
  cc_version = `#{RbConfig.expand("$(CC) --version")}`
  cc_version.match?(/clang/i)
end

#macos?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'ext/ffi_yajl/ext/parser/extconf.rb', line 30

def macos?
  !!(RUBY_PLATFORM =~ /darwin/)
end

#windows?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'ext/ffi_yajl/ext/parser/extconf.rb', line 26

def windows?
  !!(RUBY_PLATFORM =~ /mswin|mingw|cygwin|windows/)
end