lib/poolparty/core/string.rb
def class_constant(superclass=nil, opts={}, &block)
    symc = ((opts && opts[:preserve]) ? ("#{self.camelcase}Class") : "PoolParty#{self.camelcase}Class").classify

    kla=<<-EOE
      class #{symc} #{"< #{superclass}" if superclass}
      end
    EOE
    
    Kernel.module_eval kla
    klass = symc.constantize
    klass.module_eval &block if block
    
    klass
  end
# Refactor this guy to get the class if the class is defined, and not always create a new one
# although, it doesn't really matter as ruby will just reopen the class
Refactor this guy to get the class if the class is defined, and not always create a new one
although, it doesn't really matter as ruby will just reopen the class
Refactor this guy to get the class if the class is defined and not always create a new one although it doesn ' t really matter as ruby will just reopen the class
def class_constant(superclass=nil, opts={}, &block)
    symc = ((opts && opts[:preserve]) ? ("#{self.camelcase}Class") : "PoolParty#{self.camelcase}Class").classify
    kla=<<-EOE
      class #{symc} #{"< #{superclass}" if superclass}
      end
    EOE
    Kernel.module_eval kla
    klass = symc.constantize
    klass.module_eval &block if block
    klass
  end
def class_constant ( superclass = nil , opts = { } , & block ) symc = ( ( opts && opts [ :preserve ] ) ? ( "#{self.camelcase}Class" ) : "PoolParty#{self.camelcase}Class" ) . classify kla = <<-EOE 
      class  #{ symc } #{ "< #{superclass}" if superclass } 
      end
     EOE Kernel . module_eval kla klass = symc . constantize klass . module_eval & block if block klass end
Refactor this guy to get the class if the class is defined, and not always create a new one
although, it doesn't really matter as ruby will just reopen the class
Refactor this guy to get the class if the class is defined and not always create a new one although it doesn ' t really matter as ruby will just reopen the class
superclass
opts
block