Sha256: 50f5152bb634c989458452cb1346ada347a3e71e597d24c3f50d1c1c717d7bc3
Contents?: true
Size: 642 Bytes
Versions: 8
Compression:
Stored size: 642 Bytes
Contents
#encoding: UTF-8 module Str2Duck module Config ::Str2Duck::Format.singleton_methods.each do |method| self.define_singleton_method "#{method}=" do |boolean| unless !!boolean == boolean raise( ArgumentError,"invalid value given #{boolean.inspect},input must be a boolean!" ) end self.class_variable_set("@@#{method.to_s}",boolean) end self.define_singleton_method(method) do self.class_variable_get("@@#{method.to_s}") end self.class_variable_set("@@#{method.to_s}",true) end def self.list ::Str2Duck::Format.singleton_methods end end end
Version data entries
8 entries across 8 versions & 1 rubygems