Class: DasCatalog::Screencast
- Inherits:
-
Object
- Object
- DasCatalog::Screencast
- Extended by:
- Forwardable
- Includes:
- LoggerAccess
- Defined in:
- lib/das_catalog/screencast.rb
Instance Attribute Summary collapse
-
#screencast_data ⇒ Object
readonly
Returns the value of attribute screencast_data.
Class Method Summary collapse
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(screencast_data) ⇒ Screencast
constructor
A new instance of Screencast.
- #to_s ⇒ Object
Methods included from LoggerAccess
Constructor Details
#initialize(screencast_data) ⇒ Screencast
Returns a new instance of Screencast.
9 10 11 |
# File 'lib/das_catalog/screencast.rb', line 9 def initialize(screencast_data) @screencast_data = screencast_data end |
Instance Attribute Details
#screencast_data ⇒ Object (readonly)
Returns the value of attribute screencast_data.
6 7 8 |
# File 'lib/das_catalog/screencast.rb', line 6 def screencast_data @screencast_data end |
Class Method Details
.for_link(link) ⇒ Object
13 14 15 |
# File 'lib/das_catalog/screencast.rb', line 13 def self.for_link(link) new ScreencastData.for_link(link) end |
Instance Method Details
#download ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/das_catalog/screencast.rb', line 21 def download return false if screencast_data.downloaded? log.info "Starting download of #{self}" Downloader.process(self) screencast_data.downloaded log.info "Finished download of #{self}" screencast_data.save end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/das_catalog/screencast.rb', line 17 def to_s screencast_data.link end |