class LiveResource::Dependency
Attributes
target[R]
Public Class Methods
new(resource, target, proc)
click to toggle source
# File lib/live_resource/dependency.rb, line 6 def initialize(resource, target, proc) @resource = resource @proc = proc @target = target end
Public Instance Methods
invoke(*context)
click to toggle source
# File lib/live_resource/dependency.rb, line 12 def invoke(*context) @resource.instance_exec(*context, &@proc) end
watch()
click to toggle source
# File lib/live_resource/dependency.rb, line 16 def watch raise "Implement this method in a subclass, use it to set up hooks etc." end