Module: Fauna::ErrorHelpers
- Defined in:
- lib/fauna/errors.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.get_or_throw(hash, key) ⇒ Object
210 211 212 213 |
# File 'lib/fauna/errors.rb', line 210 def self.get_or_throw(hash, key) throw :invalid_response unless hash.is_a? Hash and hash.key? key hash[key] end |
.map_position(position) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/fauna/errors.rb', line 198 def self.map_position(position) unless position.nil? position.map do |part| if part.is_a? String part.to_sym else part end end end end |