Module: Vm::Readable

Included in:
VimeoAccount, VimeoResource
Defined in:
lib/vm/readable.rb

Overview

Provides methods to read attributes for public objects (accounts, videos..)

Instance Method Summary collapse

Instance Method Details

#descriptionObject

Return the description of a Vimeo object


16
17
18
# File 'lib/vm/readable.rb', line 16

def description
  info[:snippet][:description]
end

#idObject

Return the unique Vimeo identifier of a Vimeo object


6
7
8
# File 'lib/vm/readable.rb', line 6

def id
  info[:id]
end

#kindObject

Return the kind of the Vimeo object (either 'channel' or 'video')


26
27
28
# File 'lib/vm/readable.rb', line 26

def kind
  info.fetch(:kind, '').split("#").last
end

#thumbnail_urlObject

Return the URL of the Vimeo object thumbnail


21
22
23
# File 'lib/vm/readable.rb', line 21

def thumbnail_url
  info[:snippet][:thumbnails][:default][:url]
end

#titleObject

Return the title of a Vimeo object


11
12
13
# File 'lib/vm/readable.rb', line 11

def title
  info[:snippet][:title]
end