Sha256: ae96985fcbaeaed8fdf08125c48ca6f63b6d0a6c2ff24389c6fb3366788b32d4

Contents?: true

Size: 680 Bytes

Versions: 24

Compression:

Stored size: 680 Bytes

Contents

class PluginManager
  class DefinitionBuilder
    def initialize(&block)
      @block = block
      @definition = PluginDefinition.new
    end
    
    def build
      instance_eval(&@block)
      @definition
    end
    
    def name(value)
      @definition.name = value
    end
    
    def version(value)
      @definition.version = value
    end
    
    def object(value)
      @definition.object_string = value
    end
    
    def file(*values)
      @definition.file = values
    end
    
    def dependencies(*deps)
      @definition.dependencies ||= []
      deps.each_slice(2) do |name, ver|
        @definition.dependencies << [name, ver]
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
redcar-0.5.2dev lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.5.1dev lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.4.1 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.4 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.10.1dev lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.10.0dev lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.9 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.9.0dev lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.8.4 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.8.3 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.8.2 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.8.1 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.8 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.7.1 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.7 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.6 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.5 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.4.3 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.4.2 lib/plugin_manager/lib/plugin_manager/definition_builder.rb
redcar-0.3.4.1 lib/plugin_manager/lib/plugin_manager/definition_builder.rb