Class: Crankshaft::File

Inherits:
Object
  • Object
show all
Defined in:
lib/crankshaft/file.rb

Instance Method Summary collapse

Constructor Details

#initialize(torrent, attrs) ⇒ File

Returns a new instance of File.



6
7
8
9
# File 'lib/crankshaft/file.rb', line 6

def initialize(torrent, attrs)
  @torrent = torrent
  @attrs = attrs
end

Instance Method Details

#[](attribute) ⇒ Object



11
12
13
# File 'lib/crankshaft/file.rb', line 11

def [](attribute)
  return @attrs[attribute] if @attrs.include?(attribute)
end