Class: TokensChecker
- Inherits:
-
Object
- Object
- TokensChecker
- Defined in:
- lib/tokenr/tokens_checker.rb
Instance Method Summary collapse
Instance Method Details
#check(tokens) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tokenr/tokens_checker.rb', line 4 def check(tokens) starting_hash = tokens[tokens.keys.first] tokens.delete(tokens.keys.first) starting_hash.each_pair do |key, value| tokens.keys.each do |environment| break if tokens[environment][key] != value if(environment == tokens.keys.last) puts "Unrequired token - all environments have the same value '#{value}' for key '#{key}'" end end end end |