redcloth - What does this construction mean, in Ruby? -
the method below exists in redcloth gem.
my question is: construction "to(redcloth::formatters::html)" mean? "to" isn't method in class, nor in superclass (wich string class).
cheers. christian.
def to_html( *rules ) apply_rules(rules) to(redcloth::formatters::html) end
when search entire redcloth source def to
, besides finding couple of methods start to
, you'll find exact method to
in ext/redcloth_scan/redcloth_scan.rb.rl
.
there's 2 things happen here. first, file preprocessed ragel. question, may safely ignore fact , read past weird syntax in file. focus on ruby bits.
second, class redcloth::textiledoc
reopend here. means class in file , in lib/redcloth/textile_doc.rb
same. to
instance method available piece of code quoted.
Comments
Post a Comment