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

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -