Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/orion/orion_objects/hash.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.diff(hash1, hash2) ⇒ Object
8 9 10 |
# File 'lib/orion/orion_objects/hash.rb', line 8 def self.diff(hash1, hash2) Hash[*((hash1.size > hash2.size) ? hash1.to_a - hash2.to_a : hash2.to_a - hash1.to_a).flatten] end |
Instance Method Details
#to_orion ⇒ Object
4 5 6 |
# File 'lib/orion/orion_objects/hash.rb', line 4 def to_orion OpenStruct.new(self) end |