Class: WEEL::ReadOnlyHash
Overview
}}}
Instance Method Summary collapse
-
#initialize(values) ⇒ ReadOnlyHash
constructor
A new instance of ReadOnlyHash.
Methods included from HashExt
#any?, #empty?, #method_missing, #to_json
Constructor Details
#initialize(values) ⇒ ReadOnlyHash
Returns a new instance of ReadOnlyHash.
304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/weel.rb', line 304 def initialize(values) @__weel_values = values.transform_values do |v| if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom) v.root.to_doc else begin v.deep_dup rescue v.to_s rescue nil end end end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class WEEL::HashExt