Class: ExtJS::MVC::PluginBuilder
- Defined in:
- lib/xmvc/builders/plugin_builder.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
-
.instances(args = []) ⇒ Object
returns an array of PluginBuilder instances based on input from the command line.
-
.plugins_directory ⇒ Object
The plugins directory, relative to the directory the build command is run from.
Instance Method Summary collapse
- #description ⇒ Object
- #directory_name ⇒ Object
-
#initialize(name) ⇒ PluginBuilder
constructor
A new instance of PluginBuilder.
- #message ⇒ Object
- #output_filename ⇒ Object
Constructor Details
#initialize(name) ⇒ PluginBuilder
Returns a new instance of PluginBuilder.
18 19 20 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 18 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 16 def name @name end |
Class Method Details
.instances(args = []) ⇒ Object
returns an array of PluginBuilder instances based on input from the command line. The sole argument should be an array, where the first element will usually be a plugin name, or ‘all’
6 7 8 9 10 11 12 13 14 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 6 def self.instances(args = []) name = args[0] || 'all' if name == 'all' self.all_plugin_names.collect {|name| ExtMVC::PluginBuilder.new(name)} else [ExtMVC::PluginBuilder.new(name)] end end |
.plugins_directory ⇒ Object
The plugins directory, relative to the directory the build command is run from
39 40 41 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 39 def self.plugins_directory "vendor/plugins" end |
Instance Method Details
#description ⇒ Object
30 31 32 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 30 def description "The #{name} plugin (#{directory_name})" end |
#directory_name ⇒ Object
34 35 36 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 34 def directory_name "#{ExtMVC::PluginBuilder.plugins_directory}/#{@name}" end |
#message ⇒ Object
26 27 28 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 26 def "Built the #{name} plugin" end |
#output_filename ⇒ Object
22 23 24 |
# File 'lib/xmvc/builders/plugin_builder.rb', line 22 def output_filename "#{directory_name}/#{name}-all.js" end |