Class: RgGen::Core::Builder::PluginInfo
- Defined in:
- lib/rggen/core/builder/plugin_manager.rb
Instance Attribute Summary collapse
-
#gemname ⇒ Object
readonly
Returns the value of attribute gemname.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#gemname ⇒ Object (readonly)
Returns the value of attribute gemname.
10 11 12 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 10 def gemname @gemname end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 9 def path @path end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
11 12 13 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 11 def version @version end |
Class Method Details
.parse(path_or_name, version) ⇒ Object
13 14 15 16 17 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 13 def self.parse(path_or_name, version) info = new info.parse(path_or_name.to_s.strip, version) info end |
Instance Method Details
#parse(path_or_name, version) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 19 def parse(path_or_name, version) @name, @path, @gemname, @version = if path_or_name == DEFAULT_PLUGSINS || plugin_path?(path_or_name) [nil, path_or_name] else [ path_or_name, get_plugin_path(path_or_name), get_gemname(path_or_name), version ] end end |
#to_s ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/rggen/core/builder/plugin_manager.rb', line 31 def to_s if @name && @version "#{@name} (#{@version})" elsif @name @name else @path end end |