Class: NetFlix::Title
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Valuable
#attributes, attributes, create_accessor_for, create_setter_for, #deep_duplicate_of, defaults, has_collection, has_value, #initialize
Constructor Details
This class inherits a constructor from Valuable
Class Method Details
.from_json(data) ⇒ Object
17
18
19
|
# File 'lib/net_flix/title.rb', line 17
def self.from_json(data)
self.new(JSON.parse(data))
end
|
Instance Method Details
#to_json ⇒ Object
13
14
15
|
# File 'lib/net_flix/title.rb', line 13
def to_json
attributes.to_json
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/net_flix/title.rb', line 21
def to_s
title || 'unknown title'
end
|