First page Back Continue Last page Overview Graphics


Notes:

In this case, the value of forced_encoding is copied from the superclass to the subclass.

The advantage to this is that lookups in the subclass are just as fast as in the superclass. The possible disadvantage is that modifications to the superclass after subclass creation are not copied to the subclass.

The reason Sequel::Model uses the copying approach is that it is conceptually similar to how Sequel datasets worth, and the functional style of programming in general.

Does anyone have questions about this approach?