Class: Airstream::Video

Inherits:
Object
  • Object
show all
Defined in:
lib/airstream/video.rb

Constant Summary collapse

@@server =
nil

Instance Method Summary collapse

Constructor Details

#initialize(video_file) ⇒ Video

Returns a new instance of Video


10
11
12
# File 'lib/airstream/video.rb', line 10

def initialize(video_file)
  @filename = video_file
end

Instance Method Details

#to_sObject


14
15
16
# File 'lib/airstream/video.rb', line 14

def to_s
  File.basename(@filename, File.extname(@filename))
end

#urlObject


18
19
20
# File 'lib/airstream/video.rb', line 18

def url
  File.exists?(@filename) ? host_file : @filename
end