Class: Dependencies
Instance Method Summary collapse
-
#initialize(cmake, options) ⇒ Dependencies
constructor
A new instance of Dependencies.
- #libs ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(cmake, options) ⇒ Dependencies
Returns a new instance of Dependencies.
6 7 8 9 10 11 12 13 14 15 |
# File 'ext/dependencies.rb', line 6 def initialize(cmake, ) @cmake = cmake = @static_lib_shape = nil @nodes = {} @graph = Hash.new {|h, k| h[k] = []} generate_dot parse_dot end |
Instance Method Details
#libs ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'ext/dependencies.rb', line 17 def libs tsort.filter_map {|node| label, shape = @nodes[node] if shape == @static_lib_shape label.gsub(/\\n\([^)]+\)/, '') else nil end }.reverse.collect {|lib| "lib#{lib}.a"} end |
#to_s ⇒ Object
28 29 30 |
# File 'ext/dependencies.rb', line 28 def to_s libs.join(" ") end |