Kiss A simpler, smarter web application framework for Ruby

Class Subclass of Object

Methods

In Files

Public Instance Methods

cattr_reader(*syms) source

adapted from Rails, re-written for speed (only one class_eval call)

    # File lib/kiss.rb, line 39
  def cattr_reader(*syms)
    class_eval(
      syms.flatten.map do |sym|
        sym.is_a?(Hash) ? '' : %Q(
          unless defined? @@#{sym}
            @@#{sym} = nil
          end

          def self.#{sym}
            @@#{sym}
          end

          def #{sym}
            @@#{sym}
          end
        
        )
      end.join, __FILE__, __LINE__
    )
  end
    

Disabled; run with $DEBUG to generate this.