Sha256: 22d6904a2969e0463c80619807aac74c9b824ff6879b9194364f824b12cdfbed

Contents?: true

Size: 321 Bytes

Versions: 22

Compression:

Stored size: 321 Bytes

Contents

module Pansophy
  module Local
    class File
      include Adamantium::Flat

      attr_reader :pathname

      def initialize(path)
        @pathname = Pathname.new(path)
      end

      def body
        return nil unless @pathname.exist?
        ::File.read(@pathname)
      end
      memoize :body
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pansophy-1.3.0 lib/pansophy/local/file.rb
pansophy-1.2.0 lib/pansophy/local/file.rb
pansophy-1.1.0 lib/pansophy/local/file.rb
pansophy-1.0.0 lib/pansophy/local/file.rb
pansophy-1.0.0.pre.alpha.0 lib/pansophy/local/file.rb
pansophy-0.6.0 lib/pansophy/local/file.rb
pansophy-0.5.6 lib/pansophy/local/file.rb
pansophy-0.5.5 lib/pansophy/local/file.rb
pansophy-0.5.4 lib/pansophy/local/file.rb
pansophy-0.5.3 lib/pansophy/local/file.rb
pansophy-0.5.2 lib/pansophy/local/file.rb
pansophy-0.5.1 lib/pansophy/local/file.rb
pansophy-0.5.0 lib/pansophy/local/file.rb
pansophy-0.4.0 lib/pansophy/local/file.rb
pansophy-0.3.0 lib/pansophy/local/file.rb
pansophy-0.2.6 lib/pansophy/local/file.rb
pansophy-0.2.5 lib/pansophy/local/file.rb
pansophy-0.2.4 lib/pansophy/local/file.rb
pansophy-0.2.3 lib/pansophy/local/file.rb
pansophy-0.2.1 lib/pansophy/local/file.rb