Sha256: f74a49918eb416bb7c558610cb3a44f1673a1518f92104be0b04d748ed6b5a2f

Contents?: true

Size: 373 Bytes

Versions: 10

Compression:

Stored size: 373 Bytes

Contents

module Canals
  module Tools
    module Assets
      BASE = File.expand_path('../../../../assets', __FILE__)
      extend self

      def asset_path(file)
        File.expand_path(file, BASE)
      end

      def asset(file)
        File.read(asset_path(file))
      end

      class << self
        alias [] asset_path
        alias read asset
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
canals-0.9.1 lib/canals/tools/assets.rb
canals-0.9.0 lib/canals/tools/assets.rb
canals-0.8.7 lib/canals/tools/assets.rb
canals-0.8.6 lib/canals/tools/assets.rb
canals-0.8.5 lib/canals/tools/assets.rb
canals-0.8.4 lib/canals/tools/assets.rb
canals-0.8.3 lib/canals/tools/assets.rb
canals-0.8.2 lib/canals/tools/assets.rb
canals-0.8.1 lib/canals/tools/assets.rb
canals-0.8.0 lib/canals/tools/assets.rb