Skip to content

Commit 20b4525

Browse files
committed
Missing documentation.
1 parent bd7f93c commit 20b4525

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/rubydns/rule.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111
module RubyDNS
1212
# Represents a single rule in the server.
1313
class Rule
14+
# Create a new rule with a given pattern and callback.
15+
#
16+
# @parameter pattern [Array] The pattern to match against.
1417
def self.for(pattern, &block)
1518
new(pattern, block)
1619
end
1720

1821
# Create a new rule with a given pattern and callback.
1922
#
20-
# @param pattern [Array] The pattern to match against.
21-
# @param callback [Proc] The callback to invoke when the pattern matches.
23+
# @parameter pattern [Array] The pattern to match against.
24+
# @parameter callback [Proc] The callback to invoke when the pattern matches.
2225
def initialize(pattern, callback)
2326
@pattern = pattern
2427
@callback = callback
@@ -81,8 +84,9 @@ def call(server, name, resource_class, transaction)
8184
return false
8285
end
8386

87+
# Return a string representation of the rule.
8488
def to_s
85-
@pattern.inspect
89+
"#<#{self.class} #{@pattern}>"
8690
end
8791
end
8892
end

0 commit comments

Comments
 (0)