Method: Magick::RVG::Styles#deep_copy

Defined in:
lib/rvg/stylable.rb

#deep_copy(_h = nil) ⇒ Object

The “usual” deep_copy method doesn’t copy a Struct correctly.



45
46
47
48
49
# File 'lib/rvg/stylable.rb', line 45

def deep_copy(_h = nil)
  copy = Styles.new
  each_pair { |style, value| copy[style] = value }
  copy
end