def dsl_reader(name, *default, &block)
      variable = "@#{name}"
      define_method(name) do |*args|
        if args.empty?
          result = instance_variable_get(variable)
          if result.nil?
            if default.empty?
              block && instance_eval(&block)
            elsif default.size == 1
              default.first
            else
              default
            end
          else
            result
          end
        else
          raise ArgumentError, "wrong number of arguments (#{args.size} for 0)"
        end
      end
    end
def dsl_reader(name, *default, &block)
      variable = "@#{name}"
      define_method(name) do |*args|
        if args.empty?
          result = instance_variable_get(variable)
          if result.nil?
            if default.empty?
              block && instance_eval(&block)
            elsif default.size == 1
              default.first
            else
              default
            end
          else
            result
          end
        else
          raise ArgumentError, "wrong number of arguments (#{args.size} for 0)"
        end
      end
    end
This method creates a dsl reader accessor, that behaves exactly like a
 #dsl_accessor but can only be read not set.