Class: CutCut::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cutcut/base.rb

Overview

Base

Direct Known Subclasses

Media, Timelapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



6
7
8
9
# File 'lib/cutcut/base.rb', line 6

def initialize(options = {})
  @input = options.delete(:input)
  @output = options.delete(:output)
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



4
5
6
# File 'lib/cutcut/base.rb', line 4

def input
  @input
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/cutcut/base.rb', line 4

def output
  @output
end

Instance Method Details

#original_date_timeObject



11
12
13
14
# File 'lib/cutcut/base.rb', line 11

def original_date_time
  exif = MiniExiftool.new(@input)
  exif.date_time_original || exif.create_date || exif.modify_date
end