Browse files

use fetch to get message_type rather than []

  • Loading branch information...
1 parent e7e95bb commit 4e58600712959534f651e609c70a63db759014a1 Patrick Roby committed Jun 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/interpol/endpoint.rb
View
2 lib/interpol/endpoint.rb
@@ -86,7 +86,7 @@ def extract_definitions_from(endpoint_hash)
fetch_from(endpoint_hash, 'definitions').each do |definition|
fetch_from(definition, 'versions').each do |version|
- message_type = definition['message_type'] || DEFAULT_MESSAGE_TYPE
+ message_type = definition.fetch('message_type', DEFAULT_MESSAGE_TYPE)
definitions << EndpointDefinition.new(name, version, message_type, definition)
end
end

0 comments on commit 4e58600

Please sign in to comment.