Class: VixenRename::FileParser::Scene

Inherits:
Object
  • Object
show all
Defined in:
lib/vixen_rename/file_parser.rb

Overview

Class to fetch details for a scene using the filename

Instance Method Summary collapse

Constructor Details

#initialize(net) ⇒ Scene

Returns a new instance of Scene.

Parameters:



33
34
35
# File 'lib/vixen_rename/file_parser.rb', line 33

def initialize(net)
  @net = net
end

Instance Method Details

#process(file) ⇒ Object

Parameters:

  • file (String)

    Name of file



38
39
40
41
42
43
44
45
# File 'lib/vixen_rename/file_parser.rb', line 38

def process(file)
  @file = file

  return if match.nil?

  hash = search(match[:video_id], match[:site])
  return filename(hash, File.extname(@file)), hash[:release_date]
end