Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Indentation

  • Loading branch information...
commit 287bf6b3b312eba370cf0cc0ab7765195b77ab83 1 parent b473845
@weppos authored
Showing with 30 additions and 29 deletions.
  1. +1 −0  lib/whois/record/parser.rb
  2. +29 −29 lib/whois/record/parser/base.rb
View
1  lib/whois/record/parser.rb
@@ -223,6 +223,7 @@ def unchanged?(other)
parsers.size == other.parsers.size && all_in_parallel?(parsers, other.parsers) { |one, two| one.unchanged?(two) }
end
+
# Loop through all the parts to check if at least
# one part is an incomplete response.
#
View
58 lib/whois/record/parser/base.rb
@@ -299,6 +299,7 @@ def unchanged?(other)
content_for_scanner == other.content_for_scanner
end
+
# Checks whether this is an incomplete response.
#
# @return [Boolean]
@@ -352,46 +353,45 @@ def response_unavailable?
protected
- def content_for_scanner
- @content_for_scanner ||= content.to_s.gsub(/\r\n/, "\n")
- end
+ def content_for_scanner
+ @content_for_scanner ||= content.to_s.gsub(/\r\n/, "\n")
+ end
- def cached_properties_fetch(key)
- if !@cached_properties.key?(key)
- @cached_properties[key] = yield
- end
- @cached_properties[key]
+ def cached_properties_fetch(key)
+ if !@cached_properties.key?(key)
+ @cached_properties[key] = yield
end
+ @cached_properties[key]
+ end
+
private
- # @api private
- def typecast(value, type)
- if Array == type
- Array.wrap(value)
- else
- value
- end
+ def typecast(value, type)
+ if Array == type
+ Array.wrap(value)
+ else
+ value
end
+ end
- # @api private
- def handle_property(property, *args)
- unless property_supported?(property)
- return send(:"_property_#{property}", *args)
- end
+ def handle_property(property, *args)
+ unless property_supported?(property)
+ return send(:"_property_#{property}", *args)
+ end
- cached_properties_fetch(property) do
- validate!
- value = send(:"_property_#{property}", *args)
+ cached_properties_fetch(property) do
+ validate!
+ value = send(:"_property_#{property}", *args)
- case property.to_s
- when /_contacts$/, "nameservers"
- typecast(value, Array)
- else
- value
- end
+ case property.to_s
+ when /_contacts$/, "nameservers"
+ typecast(value, Array)
+ else
+ value
end
end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.