module Freebase class Category # Name of the category attr_reader :name # Metadata associated with the category attr_reader :metadata # # Creates a new Category object with the specified _name_. # def initialize(name) @name = name @metadata = {} end # # Returns the metadata with the specified _name_. # def [](name) @metadata[name] end # # Returns the name of the category in +String+ form. # def to_s @name.to_s end end end