Sha256: c8fd3e041715933471eecc3e97d4a6fc429a8b7fe121735675db9dc3f875dd23

Contents?: true

Size: 551 Bytes

Versions: 11

Compression:

Stored size: 551 Bytes

Contents

require 'cap-util/say'
require 'cap-util/run'
require 'cap-util/halt'
require 'cap-util/time'

require 'cap-util/unset_var'

module CapUtil

  def self.included(receiver)
    receiver.send(:attr_accessor, :cap)

    receiver.send(:include, CapUtil::Say)
    receiver.send(:include, CapUtil::Halt)
    receiver.send(:include, CapUtil::Run)
    receiver.send(:include, CapUtil::Time)
  end

  def get(*args, &block)
    cap.get(*args, &block)
  end

  def hostname
    val = ""
    run("hostname") {|ch, stream, out| val = out.strip}
    val
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cap-util-1.1.0 lib/cap-util.rb
cap-util-1.0.1 lib/cap-util.rb
cap-util-1.0.0 lib/cap-util.rb
cap-util-1.0.0.rc1 lib/cap-util.rb
cap-util-0.4.0 lib/cap-util.rb
cap-util-0.3.0 lib/cap-util.rb
cap-util-0.2.1 lib/cap-util.rb
cap-util-0.2.0 lib/cap-util.rb
cap-util-0.1.2 lib/cap-util.rb
cap-util-0.1.1 lib/cap-util.rb
cap-util-0.1.0 lib/cap-util.rb