Class: BuildMaster::Classpath
- Inherits:
-
Object
- Object
- BuildMaster::Classpath
- Defined in:
- lib/buildmaster/auto/classpath.rb
Instance Method Summary collapse
- #add(entry) ⇒ Object
- #add_all(dir) ⇒ Object
- #empty? ⇒ Boolean
- #include?(entry) ⇒ Boolean
-
#initialize(root = nil) ⇒ Classpath
constructor
A new instance of Classpath.
- #insert(entry) ⇒ Object
- #to_ant(id = nil) ⇒ Object
Constructor Details
Instance Method Details
#add(entry) ⇒ Object
47 48 49 |
# File 'lib/buildmaster/auto/classpath.rb', line 47 def add(entry) @entries.push(convert(entry)) end |
#add_all(dir) ⇒ Object
51 52 53 |
# File 'lib/buildmaster/auto/classpath.rb', line 51 def add_all(dir) @entries.push(ClasspathEntries.new(dir)) end |
#empty? ⇒ Boolean
55 56 57 |
# File 'lib/buildmaster/auto/classpath.rb', line 55 def empty? @entries.empty? end |
#include?(entry) ⇒ Boolean
39 40 41 |
# File 'lib/buildmaster/auto/classpath.rb', line 39 def include?(entry) @entries.include?(convert(entry)) end |
#insert(entry) ⇒ Object
43 44 45 |
# File 'lib/buildmaster/auto/classpath.rb', line 43 def insert(entry) @entries.unshift(convert(entry)) end |
#to_ant(id = nil) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/buildmaster/auto/classpath.rb', line 59 def to_ant(id=nil) return '' if empty? result = entries_to_ant if (not id.nil?) result = <<RESULT <path id="#{id}"> #{result} </path> RESULT end result end |