class Glimmer::Video::VideoObserverBrowserFunction
Public Class Methods
new(video, observer_proc, attribute)
click to toggle source
Calls superclass method
# File lib/views/glimmer/video.rb, line 223 def initialize(video, observer_proc, attribute) @observer_proc = observer_proc @attribute = attribute name = self.class.generate_name(@attribute) super(video.swt_widget, name) end
Private Class Methods
attribute_max_id(attribute)
click to toggle source
# File lib/views/glimmer/video.rb, line 249 def attribute_max_id(attribute) attribute_max_ids[attribute] ||= 0 end
attribute_max_ids()
click to toggle source
# File lib/views/glimmer/video.rb, line 253 def attribute_max_ids @attribute_max_ids ||= {} end
generate_attribute_id(attribute)
click to toggle source
# File lib/views/glimmer/video.rb, line 245 def generate_attribute_id(attribute) attribute_max_ids[attribute] = attribute_max_id(attribute) + 1 end
generate_name(attribute)
click to toggle source
# File lib/views/glimmer/video.rb, line 241 def generate_name(attribute) "video#{attribute}#{generate_attribute_id(attribute)}" end
Public Instance Methods
function(arguments)
click to toggle source
# File lib/views/glimmer/video.rb, line 230 def function(arguments) @observer_proc.call rescue => e Glimmer::Config.logger&.error "#{e.message}\n#{e.backtrace.join("\n")}" ensure nil end