Module: TMDb::Attributes
- Included in:
- Person
- Defined in:
- lib/tmdb/attributes.rb
Overview
A module for managing TMDb-derived attributes of a class.
Instance Method Summary collapse
-
#tmdb_attr(name) ⇒ Object
Adds an attribute reader with the given
name
(symbol) that delegates to the instance’s @tmdb_attrs hash entry of the same name.
Instance Method Details
#tmdb_attr(name) ⇒ Object
Adds an attribute reader with the given name
(symbol) that delegates to the instance’s @tmdb_attrs hash entry of the same name.
10 11 12 |
# File 'lib/tmdb/attributes.rb', line 10 def tmdb_attr(name) define_method(name) { @tmdb_attrs[name.to_s] } end |