lib/jsus/source_file.rb in jsus-0.2.3 vs lib/jsus/source_file.rb in jsus-0.2.4
- old
+ new
@@ -126,10 +126,17 @@
# e.g. 'Class' instead of 'Core/Class' when in package 'Core')
def provides_names(options = {})
provides.map {|p| p.name(options)}
end
+ #
+ # Returns a tag for replaced file, if any
+ #
+ def replaces
+ @replaces
+ end
+
#
# Returns a tag for source file, which this one is an extension for.
#
# E.g.: file Foo.js in package Core provides ['Class', 'Hash']. File Bar.js in package Bar
@@ -211,9 +218,10 @@
@dependencies = [@header["requires"] || []].flatten
@dependencies.map! {|tag_name| Tag.new(tag_name, :package => package) }
@provides = [@header["provides"] || []].flatten
@provides.map! {|tag_name| Tag.new(tag_name, :package => package) }
@extends = (@header["extends"] && !@header["extends"].empty?) ? Tag.new(@header["extends"]) : nil
+ @replaces = @header["replaces"] ? Tag.new(@header["replaces"]) : nil
end
def content=(new_value) # :nodoc:
@content = new_value
end
\ No newline at end of file