Module: Yt::Associations::Ids

Defined in:
lib/yt/associations/ids.rb

Overview

Provides the ‘has_one :id` method to YouTube resources, which allows to retrieve the id of a resource knowing only its username. YouTube resources with ids are: resources.

Instance Method Summary collapse

Instance Method Details

#idObject



9
10
11
# File 'lib/yt/associations/ids.rb', line 9

def id
  @id ||= ids.first!
end