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
50 51 52 53 54 |
# File 'lib/active_encode/core.rb', line 50 def cancel! run_callbacks :cancel do self.class.engine_adapter.cancel self end end |
#create! ⇒ Object
44 45 46 47 48 |
# File 'lib/active_encode/core.rb', line 44 def create! run_callbacks :create do self.class.engine_adapter.create self end end |
#initialize(input, options = nil) ⇒ Object
39 40 41 42 |
# File 'lib/active_encode/core.rb', line 39 def initialize(input, = nil) @input = input @options = || self.class.(input) end |
#purge! ⇒ Object
56 57 58 59 60 |
# File 'lib/active_encode/core.rb', line 56 def purge! run_callbacks :purge do self.class.engine_adapter.purge self end end |
#reload ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/active_encode/core.rb', line 66 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
62 63 64 |
# File 'lib/active_encode/core.rb', line 62 def remove_output!(output_id) self.class.engine_adapter.remove_output self, output_id end |