Browse files

Add @group to Answer class.

  • Loading branch information...
1 parent 9ce4788 commit 5f0e06faf3d12a47af6308e4fb564af4e70d95e8 @weppos committed Feb 14, 2011
Showing with 31 additions and 18 deletions.
  1. +30 −17 lib/whois/answer.rb
  2. +1 −1 lib/whois/answer/parser/base.rb
View
47 lib/whois/answer.rb
@@ -136,6 +136,20 @@ def parser
@parser ||= Parser.new(self)
end
+ # Returns <tt>true</tt> if the <tt>property</tt> passed as symbol
+ # is supported by any available parser for this answer.
+ #
+ # @param [Symbol] property The name of the property to check.
+ # @return [Boolean]
+ #
+ # @see Whois::Answer::Parser#property_supported?
+ #
+ def property_supported?(property)
+ parser.property_supported?(property)
+ end
+
+
+ # @group Properties
# Returns a Hash containing all supported properties for this answer
# along with corresponding values.
@@ -147,18 +161,25 @@ def properties
hash
end
- # Returns <tt>true</tt> if the <tt>property</tt> passed as symbol
- # is supported by any available parser for this answer.
+ # @endgroup
+
+
+ # @group Methods
+
+ # Collects and returns all the contacts.
#
- # @param [Symbol] property The name of the property to check.
- # @return [Boolean]
+ # @return [Array<Whois::Answer::Contact>]
#
- # @see Whois::Answer::Parser#property_supported?
+ # @see Whois::Answer::Parser#contacts
#
- def property_supported?(property)
- parser.property_supported?(property)
+ def contacts
+ parser.contacts
end
+ # @endgroup
+
+
+ # @group Response
# Checks whether this {Answer} is different than +other+.
#
@@ -198,16 +219,6 @@ def unchanged?(other)
parser.unchanged?(other.parser)
end
- # Collects and returns all the contacts.
- #
- # @return [Array<Whois::Answer::Contact>]
- #
- # @see Whois::Answer::Parser#contacts
- #
- def contacts
- parser.contacts
- end
-
# Checks whether this is a throttle response.
#
@@ -229,6 +240,8 @@ def incomplete?
parser.incomplete?
end
+ # @endgroup
+
private
View
2 lib/whois/answer/parser/base.rb
@@ -250,7 +250,7 @@ def content
property_not_implemented(property)
end
- # @properties
+ # @endgroup
# @group Methods

0 comments on commit 5f0e06f

Please sign in to comment.