Module: Freebase::Mixins
- Defined in:
- lib/freebase.rb
Overview
Add a module within this module that corresponds to a freebase class within Freebase::Types and the methods will be mixed in automatically. E.g.:
module Freebase::Mixins::Music
module Track
def formatted_length
"#{self.length.to_i / 60}:#{sprintf("%02i", self.length.to_i % 60)}"
end
end
end
Will be mixed in to the Freebase::Types:Music:Track class