Class: AnimateIt::Output

Inherits:
Struct
  • Object
show all
Defined in:
lib/animate_it/output.rb

Overview

Declarative output target: one rendered file at one path. format selects the encoder; path is repo-relative (joined onto Rails.root by the renderer); frame is set for single-frame stills, nil for animated outputs (the whole composition).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



6
7
8
# File 'lib/animate_it/output.rb', line 6

def format
  @format
end

#frameObject

Returns the value of attribute frame

Returns:

  • (Object)

    the current value of frame



6
7
8
# File 'lib/animate_it/output.rb', line 6

def frame
  @frame
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



6
7
8
# File 'lib/animate_it/output.rb', line 6

def path
  @path
end

Instance Method Details

#absolute_pathObject



11
12
13
# File 'lib/animate_it/output.rb', line 11

def absolute_path
  Rails.root.join(path.to_s)
end

#still?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/animate_it/output.rb', line 7

def still?
  !frame.nil?
end