Included Modules

MindoroMarine::Acts::HausdorffSpace::ActMethods

Public Instance Methods

acts_as_hausdorff_space(options = {}) click to toggle source

Configuration options are:

  • left_column - Column name for the left index (default: lft).
  • right_column - Column name for the right index (default: rgt). NOTE: Don’t use left and right, since these are reserved database words. (if it isn’t there already) and use that as the foreign key restriction. It’s also possible to give it an entire string that is interpolated if you need a tighter scope than just a foreign key.
# File lib/acts_as_hausdorff_space.rb, line 16
        def acts_as_hausdorff_space(options = {}) 
        #[TODO] use reverse merge here
        write_inheritable_attribute(:acts_as_hausdorff_space_options,
             { :left_column    => (options[:left_column]   || 'lft'),
               :right_column   => (options[:right_column]  || 'rgt'),
               :bias           => (options[:bias]  || 1E6),
               :max_double     => (options[:max_double] || 1E20 ),                          
               :class          => self , # for single-table inheritance
               :virtual_root   => VirtualRoot.new(-(options[:max_double] || 1E20 ),
                                                   (options[:max_double] || 1E20 ))
              } )
          
          class_inheritable_reader :acts_as_hausdorff_space_options
          unless included_modules.include? MindoroMarine::Acts::HausdorffSpace::InstanceMethods
             include MindoroMarine::Acts::HausdorffSpace::InstanceMethods
             extend MindoroMarine::Acts::HausdorffSpace::ClassMethods
          end
        end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.