Sha256: abe4cc00b70e2b5613f777858b7c093d348ed80c25cd87751a12a605f8989ce6

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

require 'facets/core/kernel/require_esc'

module Kernel

  private

  # Just like #require_esc excapt that
  # it provides the initial 'facets/core/' path.
  #
  #   require_facet 'string/capitalized?'
  #
  # _is the same as_
  #
  #   require_esc 'facets/core/string/capitalized?'
  #
  def require_facet( fpath )
    require_esc( "facets/core/#{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

3 entries across 3 versions & 1 rubygems

Version Path
facets-1.8.49 lib/facets/yore/kernel/require_facet.rb
facets-1.8.51 lib/facets/yore/kernel/require_facet.rb
facets-1.8.54 lib/facets/yore/kernel/require_facet.rb