Class: Crankshaft::File
- Inherits:
-
Object
- Object
- Crankshaft::File
- Defined in:
- lib/crankshaft/file.rb
Instance Method Summary collapse
- #[](attribute) ⇒ Object
-
#initialize(torrent, attrs) ⇒ File
constructor
A new instance of File.
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 |