Module: ActiveEncode::Core
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #cancel! ⇒ Object
- #create! ⇒ Object
- #initialize(input, options = nil) ⇒ Object
- #purge! ⇒ Object
- #reload ⇒ Object
- #remove_output!(output_id) ⇒ Object
Instance Method Details
#cancel! ⇒ Object
52 53 54 55 56 |
# File 'lib/active_encode/core.rb', line 52 def cancel! run_callbacks :cancel do self.class.engine_adapter.cancel self end end |
#create! ⇒ Object
46 47 48 49 50 |
# File 'lib/active_encode/core.rb', line 46 def create! run_callbacks :create do self.class.engine_adapter.create self end end |
#initialize(input, options = nil) ⇒ Object
41 42 43 44 |
# File 'lib/active_encode/core.rb', line 41 def initialize(input, = nil) @input = input @options = || self.class.(input) end |
#purge! ⇒ Object
58 59 60 61 62 |
# File 'lib/active_encode/core.rb', line 58 def purge! run_callbacks :purge do self.class.engine_adapter.purge self end end |
#reload ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/active_encode/core.rb', line 68 def reload fresh_encode = self.class.engine_adapter.find(id, cast: self.class) @id = fresh_encode.id @input = fresh_encode.input @output = fresh_encode.output @state = fresh_encode.state @current_operations = fresh_encode.current_operations @errors = fresh_encode.errors @tech_metadata = fresh_encode. self end |
#remove_output!(output_id) ⇒ Object
64 65 66 |
# File 'lib/active_encode/core.rb', line 64 def remove_output! output_id self.class.engine_adapter.remove_output self, output_id end |