lib/dcgen/plugins/label.rb in salesforce-dcgen-0.5.0 vs lib/dcgen/plugins/label.rb in salesforce-dcgen-0.6.0

- old
+ new

@@ -1,10 +1,10 @@ require 'nokogiri' module Dcgen - def self.label master , destination + def self.label master , destination, output = true remove_labels = [] master_labels = Dir.glob(master + '/labels/*labels').map {|c| c.match(/^.*\/(.*).labels$/)[1] } @@ -29,12 +29,15 @@ end end - puts "Labels:" if not remove_labels.empty? - remove_labels.each do |label| - puts " #{label}" + + if output + puts "Labels:" if not remove_labels.empty? + remove_labels.each do |label| + puts " #{label}" + end end remove_labels end