Module Boson::Commands::WebCore

  1. lib/boson/commands/web_core.rb

Methods

public class

  1. def_which_requires

public instance

  1. browser

Classes and Modules

Class Boson::Commands::WebCore::Get

Public class methods

def_which_requires (meth, *libs, &block)

Requires libraries only once before defining method with given block

[show source]
# File lib/boson/commands/web_core.rb, line 24
  def self.def_which_requires(meth, *libs, &block)
    define_method(meth) do |*args|
      libs.each {|e| require e }
      define_method(meth, block).call(*args)
    end
  end

Public instance methods

browser (*urls)

non-mac users should override this with the launchy gem

[show source]
# File lib/boson/commands/web_core.rb, line 65
  def browser(*urls)
    system('open', *urls)
  end