Sha256: 982e4d57536606ab9d00e1a0f76f12c6b1a6e091e794e709c20c129ecf1f8040

Contents?: true

Size: 558 Bytes

Versions: 4

Compression:

Stored size: 558 Bytes

Contents

module Motion ; module Xray

  class Plugin
    attr_accessor :name
    attr :view
    attr :target

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

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

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

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

    def edit(target)
      @target = target
    end

    def show
    end

    def hide
    end

  end

end end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
motion-xray-1.0.8 lib/motion-xray/xray_plugin.rb
motion-xray-1.0.7 lib/motion-xray/xray_plugin.rb
motion-xray-1.0.6 lib/motion-xray/xray_plugin.rb
motion-xray-1.0.4 lib/motion-xray/xray_plugin.rb