Mixin::Platform

A mixin for querying the platform running Ruby

Installation

Add this line to your application's Gemfile:

gem 'mixin-platform'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mixin-platform

Usage

Using it as a Mixin

require 'mixin/platform'

class PowerUp
  include Mixin::Platform
end

power_up = PowerUp.new
power_up.osx?     #=> true
power_up.windows? #-> false
power_up.linux?   #=> false

Using it as a module

require 'mixin/platform'

Mixin::Platform.osx?     #=> true
Mixin::Platform.windows? #=> false
Mixin::Platform.linux?   #=> false

Authors and Contributors

Thank you to all of our Contributors, testers, and users.