Class: Gumbo::PackageFile

Inherits:
AssetFile show all
Defined in:
lib/gumbo/package_file.rb

Instance Attribute Summary collapse

Attributes inherited from AssetFile

#context, #name, #output_dir, #source_dir

Instance Method Summary collapse

Methods inherited from AssetFile

#build, class_for, ext, for, #initialize, #logger, #replace_ext, #should_be_rebuilt?

Constructor Details

This class inherits a constructor from Gumbo::AssetFile

Instance Attribute Details

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/gumbo/package_file.rb', line 3

def type
  @type
end

Instance Method Details

#eql?(o) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


13
14
15
# File 'lib/gumbo/package_file.rb', line 13

def eql?(o)
  super && o.type == type
end

#hashObject



18
19
20
# File 'lib/gumbo/package_file.rb', line 18

def hash
  super ^ type.hash
end

#output_fileObject



9
10
11
# File 'lib/gumbo/package_file.rb', line 9

def output_file
  @output_file ||= File.join(output_dir, type, name)
end

#source_fileObject



5
6
7
# File 'lib/gumbo/package_file.rb', line 5

def source_file
  @source_file ||= File.join(source_dir, type, name)
end