Sha256: d68653add6a8015b9c2bcf8a56a42d6b91cf5059f202069a2635d4ed7a745e92

Contents?: true

Size: 310 Bytes

Versions: 2

Compression:

Stored size: 310 Bytes

Contents

# An Asset is a wrapper around anything sprockets can compile
module Stylish
  class Asset < Hashie::Dash
    property :logical_path

    def asset
      Stylish.sprockets.find_asset(logical_path)
    end

    def contents
      asset.pathname.read
    end

    def compiled
      asset.to_s
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stylish-0.3.1 lib/stylish/asset.rb
stylish-0.3.0 lib/stylish/asset.rb