Class: Motion::Xray::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-xray/xray_plugin.rb

Direct Known Subclasses

SaveUIPlugin, UIPlugin

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name


4
5
6
# File 'lib/motion-xray/xray_plugin.rb', line 4

def name
  @name
end

#targetObject (readonly)

Returns the value of attribute target


6
7
8
# File 'lib/motion-xray/xray_plugin.rb', line 6

def target
  @target
end

#viewObject (readonly)

Returns the value of attribute view


5
6
7
# File 'lib/motion-xray/xray_plugin.rb', line 5

def view
  @view
end

Class Method Details

.name(value = nil) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/motion-xray/xray_plugin.rb', line 8

def Plugin.name(value=nil)
  if value
    @name = value
  else
    @name
  end
end

Instance Method Details

#edit(target) ⇒ Object


28
29
30
# File 'lib/motion-xray/xray_plugin.rb', line 28

def edit(target)
  @target = target
end

#get_plugin_view(canvas) ⇒ Object


24
25
26
# File 'lib/motion-xray/xray_plugin.rb', line 24

def get_plugin_view(canvas)
  @view ||= plugin_view(canvas)
end

#hideObject


35
36
# File 'lib/motion-xray/xray_plugin.rb', line 35

def hide
end

#plugin_view(canvas) ⇒ Object


20
21
22
# File 'lib/motion-xray/xray_plugin.rb', line 20

def plugin_view(canvas)
  raise "You must implement `#{self.class}#plugin_view`"
end

#showObject


32
33
# File 'lib/motion-xray/xray_plugin.rb', line 32

def show
end

#xray_nameObject


16
17
18
# File 'lib/motion-xray/xray_plugin.rb', line 16

def xray_name
  @name || self.class.name
end