Skip to content

Commit

Permalink
Update facts_for_platform_by_name to take an array
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dreier committed Dec 15, 2014
1 parent 8056a12 commit 356e3ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/puppet_spec_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ def self.facts_for_platform_by_fact(factstyle: nil, select_facts: {})
}
end

def self.facts_for_platform_by_name(platform)
puppet_platforms[platform]
def self.facts_for_platform_by_name(platforms)
platforms = [platforms] if platforms.is_a?(String)
results = {}
platforms.each do |name|
results[:"#{name}"] = puppet_platforms[name]
end
results
end

def self.resave_all_facts
Expand Down

0 comments on commit 356e3ee

Please sign in to comment.