Class: Amaranth::Language
- Inherits:
-
Collection
- Object
- Collection
- Amaranth::Language
- Defined in:
- lib/amaranth/language.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Collection
#==, #attributes, #attributes=, field, fields, #initialize
Constructor Details
This class inherits a constructor from Amaranth::Collection
Class Method Details
.all(video_id:) ⇒ Object
5 6 7 8 9 |
# File 'lib/amaranth/language.rb', line 5 def self.all video_id: fetch("/api/videos/#{video_id}/languages/").map do |attributes| new attributes.keep_if { |key, value| fields.include? key.to_sym } end end |
Instance Method Details
#updated_at ⇒ Object
18 19 20 |
# File 'lib/amaranth/language.rb', line 18 def updated_at versions.map { |hash| hash["created"] }.max end |