Class: Hash
Instance Method Summary collapse
Instance Method Details
#except(*keys) ⇒ Object
78 79 80 |
# File 'lib/tmdb.rb', line 78 def except(*keys) dup.except!(*keys) end |
#except!(*keys) ⇒ Object
82 83 84 85 |
# File 'lib/tmdb.rb', line 82 def except!(*keys) keys.each { |key| delete(key) } self end |
#to_tmdb_struct(klass = Tmdb::Struct) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/tmdb.rb', line 52 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 |