lib/chatterbot/config.rb
#
# simple boolean attribute generator. define the attribute and a
# default value and you get a setter and predicate method
#
# @param [Symbol] key the key for the variable
# @param [Boolean] default default value
simple boolean attribute generator. define the attribute and a
default value and you get a setter and predicate method
simple boolean attribute generator . define the attribute and a default value and you get a setter and predicate method
def attr_boolean(key, default=false)
			  class_eval <<-EVAL
          attr_writer :#{key.to_s}
          def #{key.to_s}?
            (@#{key.to_s} == true) || #{default}
          end
        EVAL
      end
def attr_boolean ( key , default = false ) class_eval <<-EVAL 
          attr_writer : #{ key . to_s } 

          def  #{ key . to_s } ?
            (@ #{ key . to_s }  == true) ||  #{ default } 
          end
         EVAL end
simple boolean attribute generator.
simple boolean attribute generator .
key
<not_specific>
default
<not_specific>
<not_specific>
default default value
default default value