Class: ConfSources::Clone
Instance Attribute Summary
Attributes inherited from Default
Instance Method Summary collapse
-
#initialize(other) ⇒ Clone
constructor
A new instance of Clone.
Methods inherited from Default
#[], #export_to, #is_defined?, #merge, #merge!, #to_a, #to_h, #to_pairs, #to_s, #validate!
Constructor Details
#initialize(other) ⇒ Clone
Returns a new instance of Clone.
76 77 78 79 80 81 82 83 84 |
# File 'lib/confsources.rb', line 76 def initialize other if other.kind_of? Default = other..collect {|el|el.clone} elsif other.is_a? Array = other.collect {|el| el.clone} else raise RuntimeError, "Can't clone configuration sorce from #{other.class}" end end |