Sha256: 342f18ab1917ec3e9ad65cbfc3a71a4582b2a3e0ea2b16e2710f25aaf5851844

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

require_relative "../metacrunch"

class Metacrunch::File
  require_relative "./file/reader"

  attr_accessor :content
  attr_accessor :entry_name # equals file_name for plain files
  attr_accessor :file_name

  def initialize(options = {})
    @content = options[:content]
    @entry_name = options[:entry_name]
    @file_name = options[:file_name]
  end

  def to_h
    {
      content: @content,
      entry_name: @entry_name,
      file_name: @file_name
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metacrunch-2.2.2 lib/metacrunch/file.rb
metacrunch-2.2.1 lib/metacrunch/file.rb
metacrunch-2.2.0 lib/metacrunch/file.rb