Class: DasCatalog::ScreencastData
- Inherits:
-
Object
- Object
- DasCatalog::ScreencastData
- Defined in:
- lib/das_catalog/screencast_data.rb
Instance Attribute Summary collapse
-
#downloaded ⇒ Object
readonly
Returns the value of attribute downloaded.
-
#link ⇒ Object
(also: #id)
readonly
Returns the value of attribute link.
-
#watched ⇒ Object
readonly
Returns the value of attribute watched.
Class Method Summary collapse
Instance Method Summary collapse
- #download_link ⇒ Object
- #downloaded? ⇒ Boolean
-
#initialize(link) ⇒ ScreencastData
constructor
A new instance of ScreencastData.
- #save ⇒ Object
- #unwatched ⇒ Object
- #watched? ⇒ Boolean
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
#downloaded ⇒ Object (readonly)
Returns the value of attribute downloaded.
3 4 5 |
# File 'lib/das_catalog/screencast_data.rb', line 3 def downloaded @downloaded end |
#link ⇒ Object (readonly) Also known as: id
Returns the value of attribute link.
3 4 5 |
# File 'lib/das_catalog/screencast_data.rb', line 3 def link @link end |
#watched ⇒ Object (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
Instance Method Details
#download_link ⇒ Object
15 16 17 |
# File 'lib/das_catalog/screencast_data.rb', line 15 def download_link "#{link}/download" end |
#downloaded? ⇒ Boolean
23 24 25 |
# File 'lib/das_catalog/screencast_data.rb', line 23 def downloaded? @downloaded end |
#save ⇒ Object
39 40 41 |
# File 'lib/das_catalog/screencast_data.rb', line 39 def save Store.store(self) end |
#unwatched ⇒ Object
31 32 33 |
# File 'lib/das_catalog/screencast_data.rb', line 31 def unwatched @watched = false end |
#watched? ⇒ Boolean
35 36 37 |
# File 'lib/das_catalog/screencast_data.rb', line 35 def watched? @watched end |