Skip to content

Commit

Permalink
Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Feb 7, 2011
1 parent a14b74f commit 1b72227
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/citrus.rb
Expand Up @@ -670,6 +670,11 @@ def to_s
end end
end end


# This alias allows strings to be compared to the string representation of
# Rule objects. It is most useful in assertions in unit tests, e.g.:
#
# assert_equal('"a" | "b"', rule)
#
alias_method :to_str, :to_s alias_method :to_str, :to_s


# Returns the Citrus notation of this rule as a string that is suitable to # Returns the Citrus notation of this rule as a string that is suitable to
Expand Down Expand Up @@ -1287,6 +1292,11 @@ def to_s
@string @string
end end


# This alias allows strings to be compared to the string value of Match
# objects. It is most useful in assertions in unit tests, e.g.:
#
# assert_equal("a string", match)
#
alias_method :to_str, :to_s alias_method :to_str, :to_s


# The default value for a match is its string value. This method is # The default value for a match is its string value. This method is
Expand Down

0 comments on commit 1b72227

Please sign in to comment.