Sha256: 588340d2099448d00791d768694f029d6fc89ce38ef2d380491f5e2ae3857243

Contents?: true

Size: 684 Bytes

Versions: 13

Compression:

Stored size: 684 Bytes

Contents

require 'facet/kernel/require_esc'

module Kernel

  private

  # Just like #require_esc excapt that
  # it provides the initial 'facet/' path.
  #
  #   require_facet 'string/capitalized?'
  #
  # _is the same as_
  #
  #   require_esc 'facet/string/capitalized?'
  #
  def require_facet( fpath )
    require_esc( "facet/#{fpath}" )
  end

end



#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TCKernel < Test::Unit::TestCase

    def test_require_facet
      assert_nothing_raised { require_facet 'string/margin' }
      assert( "".respond_to?( :margin ) )
    end

  end

=end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
facets-1.4.0 lib/facets/core/kernel/require_facet.rb
facets-1.4.1 lib/facets/core/kernel/require_facet.rb
facets-1.4.2 lib/facets/core/kernel/require_facet.rb
facets-1.4.3 lib/facets/core/kernel/require_facet.rb
facets-1.4.4 lib/facets/core/kernel/require_facet.rb
facets-1.4.5 lib/facets/core/kernel/require_facet.rb
facets-1.7.30 lib/facets/core/kernel/require_facet.rb
facets-1.7.0 lib/facets/core/kernel/require_facet.rb
facets-1.7.38 lib/facets/core/kernel/require_facet.rb
facets-1.7.46 lib/facets/core/kernel/require_facet.rb
facets-1.8.0 lib/facets/yore/kernel/require_facet.rb
facets-1.8.20 lib/facets/yore/kernel/require_facet.rb
facets-1.8.8 lib/facets/yore/kernel/require_facet.rb