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

- old
+ new

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