Class: Hash
Instance Method Summary collapse
Instance Method Details
#except(*keys) ⇒ Object
75 76 77 |
# File 'lib/tmdb.rb', line 75 def except(*keys) dup.except!(*keys) end |
#except!(*keys) ⇒ Object
79 80 81 82 |
# File 'lib/tmdb.rb', line 79 def except!(*keys) keys.each { |key| delete(key) } self end |
#to_tmdb_struct(klass = Tmdb::Struct) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/tmdb.rb', line 49 def to_tmdb_struct(klass=Tmdb::Struct) if descendent_of_tmdb_struct?(klass) klass.new(self) else raise Tmdb::Error, 'Tried to convert to a non Tmdb::Struct object' end end |