3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/acts_as_cleo_connection/acts_methods.rb', line 3
def acts_as_cleo_connection(opts = {})
include InstanceMethods
after_create :create_cleo_connection
after_update :update_cleo_connection
before_destroy :remove_cleo_connection
cattr_accessor :cleo_target
cattr_accessor :cleo_origin
cattr_accessor :cleo_type
cattr_accessor :cleo_strength
self.cleo_origin = opts[:origin]
self.cleo_target = opts[:target]
self.cleo_type = opts[:type]
self.cleo_strength = opts[:strengh]
end
|