Class: DasCatalog::ScreencastData

Inherits:
Object
  • Object
show all
Defined in:
lib/das_catalog/screencast_data.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(link) ⇒ ScreencastData

Returns a new instance of ScreencastData.



5
6
7
# File 'lib/das_catalog/screencast_data.rb', line 5

def initialize(link)
  @link = link
end

Instance Attribute Details

#downloadedObject (readonly)

Returns the value of attribute downloaded.



3
4
5
# File 'lib/das_catalog/screencast_data.rb', line 3

def downloaded
  @downloaded
end

Returns the value of attribute link.



3
4
5
# File 'lib/das_catalog/screencast_data.rb', line 3

def link
  @link
end

#watchedObject (readonly)

Returns the value of attribute watched.



3
4
5
# File 'lib/das_catalog/screencast_data.rb', line 3

def watched
  @watched
end

Class Method Details



9
10
11
# File 'lib/das_catalog/screencast_data.rb', line 9

def self.for_link(link)
  Store.find(link) or new(link)
end

Instance Method Details



15
16
17
# File 'lib/das_catalog/screencast_data.rb', line 15

def download_link
  "#{link}/download"
end

#downloaded?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/das_catalog/screencast_data.rb', line 23

def downloaded?
  @downloaded
end

#saveObject



39
40
41
# File 'lib/das_catalog/screencast_data.rb', line 39

def save
  Store.store(self)
end

#unwatchedObject



31
32
33
# File 'lib/das_catalog/screencast_data.rb', line 31

def unwatched
  @watched = false
end

#watched?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/das_catalog/screencast_data.rb', line 35

def watched?
  @watched
end