Sha256: a005c71f460e4e46f01899bcbb63a1d71410d683664fe5d278e0048553ed66a5
Contents?: true
Size: 795 Bytes
Versions: 1
Compression:
Stored size: 795 Bytes
Contents
# attr_accessor for class variable. # usage: # # ``` # class Pod # class_attr_accessor :is_prebuild_stage # end # ``` # def class_attr_accessor(symbol) self.class.send(:attr_accessor, symbol) end class Object def deep_clone return @deep_cloning_obj if @deep_cloning @deep_cloning_obj = clone @deep_cloning_obj.instance_variables.each do |var| val = @deep_cloning_obj.instance_variable_get(var) begin @deep_cloning = true val = val.deep_clone rescue TypeError next ensure @deep_cloning = false end @deep_cloning_obj.instance_variable_set(var, val) end deep_cloning_obj = @deep_cloning_obj @deep_cloning_obj = nil deep_cloning_obj end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cocoapods-binary-0.2 | lib/cocoapods-binary/tool/tool.rb |