Class: RSpecRcv::Helpers::DeepExcept

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec-rcv/helpers/deep_except.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash, except) ⇒ DeepExcept

Returns a new instance of DeepExcept.



4
5
6
7
# File 'lib/rspec-rcv/helpers/deep_except.rb', line 4

def initialize(hash, except)
  @hash = hash
  @except = except
end

Instance Method Details

#to_hObject



9
10
11
# File 'lib/rspec-rcv/helpers/deep_except.rb', line 9

def to_h
  inject(@hash, @except.map(&:to_sym))
end