module TMDb::Attributes

A module for managing TMDb-derived attributes of a class.

Public Instance Methods

tmdb_attr(name) click to toggle source

Adds an attribute reader with the given name (symbol) that delegates to the instance’s +@tmdb_attrs+ hash entry of the same name.

# File lib/tmdb/attributes.rb, line 10
def tmdb_attr(name)
  define_method(name) { @tmdb_attrs[name.to_s] }
end