Sha256: fdb4ea47a871a8b7c71bdb9234fb8d705a80b093e3920c56502deb8e3baca338
Contents?: true
Size: 476 Bytes
Versions: 4
Compression:
Stored size: 476 Bytes
Contents
module CSD class GlobalOpenStruct def self.method_missing(meth, *args, &block) if meth.to_s.ends_with?('=') class_variable_set("@@#{meth.to_s.chop}".to_sym, *args) else begin class_variable_get("@@#{meth}".to_sym) rescue NameError => e #UI.debug "The option `#{meth}ยด was accessed but not available." # FIXME: This line causes a recursion error :) nil end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
csd-0.1.2 | lib/csd/global_open_struct.rb |
csd-0.1.1 | lib/csd/global_open_struct.rb |
csd-0.1.0 | lib/csd/global_open_struct.rb |
csd-0.0.16 | lib/csd/global_open_struct.rb |