Method: Module#cattr_accessor

Defined in:
lib/appfront/command/base.rb

#cattr_accessor(attribute_name) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/appfront/command/base.rb', line 2

def cattr_accessor(attribute_name)
  class_eval <<-CODE
    def self.#{attribute_name}
      @@#{attribute_name} ||= nil
    end
    def self.#{attribute_name}=(value)
      @@#{attribute_name} = value
    end
  CODE
end