jxxcarlson/asciidoctor-latex — pull request #2 by jirutka (2014-12-13 22:07:18+00:00)
Title: Various fixes

Here’s the second round.

### Fix bad class method definitions

Good explanation is in the [Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide#def-self-singletons).

### Move colored_text to core_ext subdir and rename to colored_string

There's a good convention to put monkey-patching of core classes into `core_ext` subdirectory, to be very clear what's going on.

### Remove unnecessary monkey-patching of String

Monkey-patching should be used very cautiously and sparingly, especially in the case of core classes. When you monkey-patch some class (e.g. add some method to it), it doesn’t change it only in the current context (file), but globally!

### Fix camelCase method names

This is strong Ruby [convention](https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars).

### Remove unreasonable includes to main

I’m not sure if you actually know what `include` does. There’s a good explanation on [StackOverflow](http://stackoverflow.com/a/318170/2217862). When you include some class/module on the top-level (i.e. not inside another class/module), then you include it into the top-level object called `main`. This is _not_ scoped to the current file, it’s global! This is useful only for DSLs, in the most of other cases it’s inappropriate and messy.