Permalink
Browse files

yardoc

  • Loading branch information...
1 parent 06c14ba commit 7c61494e3fa8e15bc919649dc3c01169ddb3b3e3 @weppos weppos committed Dec 1, 2009
Showing with 16 additions and 5 deletions.
  1. +4 −4 lib/whois/answer/registrar.rb
  2. +12 −1 lib/whois/answer/super_struct.rb
@@ -27,10 +27,10 @@ class Answer
#
# A Registrar is composed by the following attributes:
#
- # <tt>:id</tt>::
- # <tt>:name</tt>::
- # <tt>:organization</tt>::
- # <tt>:url</tt>::
+ # * <tt>:id</tt>
+ # * <tt>:name</tt>
+ # * <tt>:organization</tt>
+ # * <tt>:url</tt>
#
# Be aware that every WHOIS server can return a different number of details
# or no details at all.
@@ -31,11 +31,22 @@ class SuperStruct < Struct
# Overwrites the standard Struct initializer
# to add the ability to create an instance from a Hash of parameters.
#
+ # If block is given, yields self.
+ #
# attributes = { :foo => 1, :bar => "baz" }
# Struct.new(attributes)
# # => #<Struct foo=1, bar="baz">
#
- # If block is given, the block is called on self.
+ # @overload initialize(value, value, ...)
+ # Initializes a new instance setting each Struct key to the value
+ # passed in the same order in the argument list.
+ # @param [Object] value describe value param
+ # @overload initialize(attributes)
+ # Initializes a new instance from the key-value Hash.
+ # @param [Hash<Symbol => Object>] attributes
+ # @return [SuperStruct]
+ # @yield [self] a block to perform any extra initialization on the object
+ # @yieldparam [Client] self the newly initialized client object
#
def initialize(*args, &block)
if args.first.is_a? Hash

0 comments on commit 7c61494

Please sign in to comment.