Module: Horza::Adapters::InstanceMethods
- Included in:
- AbstractAdapter
- Defined in:
- lib/horza/adapters/instance_methods.rb
Instance Method Summary collapse
- #create(options = {}) ⇒ Object
- #create_as_child(parent_id, options = {}) ⇒ Object
- #delete(id) ⇒ Object
- #find_first(options = {}) ⇒ Object
- #get(id) ⇒ Object
- #initialize(context) ⇒ Object
- #update(id, options = {}) ⇒ Object
Instance Method Details
#create(options = {}) ⇒ Object
17 18 19 |
# File 'lib/horza/adapters/instance_methods.rb', line 17 def create( = {}) run_quietly { create!() } end |
#create_as_child(parent_id, options = {}) ⇒ Object
21 22 23 |
# File 'lib/horza/adapters/instance_methods.rb', line 21 def create_as_child(parent_id, = {}) run_quietly { create_as_child!(parent_id, ) } end |
#delete(id) ⇒ Object
25 26 27 |
# File 'lib/horza/adapters/instance_methods.rb', line 25 def delete(id) run_quietly { delete!(id) } end |
#find_first(options = {}) ⇒ Object
13 14 15 |
# File 'lib/horza/adapters/instance_methods.rb', line 13 def find_first( = {}) run_quietly { find_first!() } end |
#get(id) ⇒ Object
9 10 11 |
# File 'lib/horza/adapters/instance_methods.rb', line 9 def get(id) run_quietly { get!(id) } end |
#initialize(context) ⇒ Object
5 6 7 |
# File 'lib/horza/adapters/instance_methods.rb', line 5 def initialize(context) @context = context end |
#update(id, options = {}) ⇒ Object
29 30 31 |
# File 'lib/horza/adapters/instance_methods.rb', line 29 def update(id, = {}) run_quietly { update!(id, ) } end |