class EY::CloudClient::ResolverResult
Attributes
api[R]
errors[R]
matches[R]
suggestions[R]
Public Class Methods
new(api, matches, errors, suggestions)
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 6 def initialize(api, matches, errors, suggestions) @api, @matches, @errors, @suggestions = api, matches, errors, suggestions end
Public Instance Methods
many_matches(&block)
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 16 def many_matches(&block) many_matches? && block && block.call(matches) end
many_matches?()
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 12 def many_matches?() matches.size > 1 end
no_matches(&block)
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 15 def no_matches(&block) no_matches? && block && block.call(errors, suggestions) end
no_matches?()
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 11 def no_matches?() matches.empty? end
one_match(&block)
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 14 def one_match(&block) one_match? && block && block.call(matches.first) end
one_match?()
click to toggle source
# File lib/engineyard-cloud-client/resolver_result.rb, line 10 def one_match?() matches.size == 1 end