README in lazydoc-0.1.0 vs README in lazydoc-0.2.0

- old
+ new

@@ -61,24 +61,59 @@ # and stops at the next # non-comment line, the next # constant attribute, or an end # key # .............................. - #} + # } In addition, individual lines of code may be registered and resolved by Lazydoc: doc = Sample.lazydoc.reset comment = doc.register(/method_one/) doc.resolve comment.subject # => " def method_one" comment.content # => [["comment content for a code comment", "may similarly span multiple lines"]] + +A variety of helper methods exist to register methods, in particular: + class Helpers + extend Lazydoc::Attributes + + register_method___ + # method_one was registered by the + # helper + def method_one(a, b='str', &c) + end + + # method_two illustrates registration + # of the line that *calls* method_two + def method_two + Lazydoc.register_caller + end + end + + # *THIS* is the line that gets registered + # by method_two + Helpers.new.method_two + + doc = Helpers.lazydoc + doc.resolve + + m1 = doc.comments[0] + m1.method_name # => "method_one" + m1.arguments # => ["a", "b='str'", "&c"] + m1.to_s # => "method_one was registered by the helper" + + comment = doc.comments[1] + comment.subject # => "Helpers.new.method_two" + comment.to_s # => "*THIS* is the line that gets registered by method_two" + Check out these links for development, and bug tracking. * Website[http://tap.rubyforge.org/lazydoc] * Github[http://github.com/bahuvrihi/lazydoc/tree/master] +* Lighthouse[http://bahuvrihi.lighthouseapp.com/projects/19948-lazydoc/tickets?q=all] * {Google Group}[http://groups.google.com/group/ruby-on-tap] == Usage === Constant Attributes