Module: ActiveEncode::Core::ClassMethods
- Defined in:
- lib/active_encode/core.rb
Instance Method Summary collapse
- #create(input_url, options = {}) ⇒ Object
- #default_options(_input_url) ⇒ Object
- #find(id) ⇒ Object
- #list(*args) ⇒ Object
Instance Method Details
#create(input_url, options = {}) ⇒ Object
35 36 37 38 |
# File 'lib/active_encode/core.rb', line 35 def create(input_url, = {}) object = new(input_url, ) object.create! end |
#default_options(_input_url) ⇒ Object
31 32 33 |
# File 'lib/active_encode/core.rb', line 31 def (_input_url) {} end |
#find(id) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/active_encode/core.rb', line 40 def find(id) raise ArgumentError, 'id cannot be nil' unless id encode = new(nil) encode.run_callbacks :find do encode.send(:merge!, engine_adapter.find(id)) end end |
#list(*args) ⇒ Object
48 49 50 51 |
# File 'lib/active_encode/core.rb', line 48 def list(*args) ActiveSupport::Deprecation.warn("#list will be removed without replacement in ActiveEncode 0.3") engine_adapter.list(args) end |