Sha256: 48976a51577c67386dae988cff204a0ea4c37d3be751c0948c6f57eb3afd080a

Contents?: true

Size: 583 Bytes

Versions: 29

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'eac_templates/interface_methods'
require 'eac_templates/abstract/fs_object'
require 'eac_templates/variables/file'

module EacTemplates
  module Abstract
    class File < ::EacTemplates::Abstract::FsObject
      enable_abstract_methods
      delegate(*::EacTemplates::InterfaceMethods::FILE - %i[content path], to: :applier)

      # @return [String]
      def content
        path.read
      end

      # @return [Pathname]
      def path
        raise_abstract_method __method__
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
eac_templates-0.7.1 lib/eac_templates/abstract/file.rb
eac_tools-0.93.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_templates-0.7.0 lib/eac_templates/abstract/file.rb
eac_tools-0.91.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_templates-0.5.1 lib/eac_templates/abstract/file.rb
eac_tools-0.76.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.75.2 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.75.1 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.75.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.74.1 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.74.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.73.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.72.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.70.1 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.70.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.69.1 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.69.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.68.0 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.67.1 sub/eac_templates/lib/eac_templates/abstract/file.rb
eac_tools-0.67.0 sub/eac_templates/lib/eac_templates/abstract/file.rb