Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
module GraphicsElements
class GraphicsElementPresenter
def present(graphics_element)
GraphicsElementData.new(
source_file_name: graphics_element.source_file_name,
timecode_in: graphics_element.timecode_in,
should_toggle_checkmark: toggle_checkmark?(graphics_element),
is_valid: graphics_element.valid?,
)
end
private
def toggle_checkmark?(graphics_element)
graphics_element.source_file_name.present? && graphics_element.timecode_in.present?
end
class GraphicsElementData < Struct.new(
:source_file_name,
:timecode_in,
:should_toggle_checkmark,
:is_valid,
keyword_init: true)
end
end
end