Sha256: 060e07a44ff4841ae3671ea1ab8f7a9ce23fa9fd9a1a1dd10912bc3ce4c2eff1

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

require "anypow/version"
require "anypow/app"

module Anypow
  def self.ruby_18?
    defined?(RUBY_VERSION) and RUBY_VERSION =~ /^1\.8\.\d+/
  end

  def run(app)
    if is_pow?
      super(app) if app.class == Anypow::App
    else
      super(app) if app.class != Anypow::App
    end
  end

  def run_pow(command)
    run Anypow::App.new(command) if is_pow?
  end

  def is_pow?
    self.class.to_s == "Nack::Builder"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anypow-0.0.2 lib/anypow.rb