command_builder 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ module CommandBuilder
|
|
10
10
|
|
11
11
|
def initialize(options={})
|
12
12
|
@definitions_dir = 'command_definitions'
|
13
|
+
@module_name = options[:module_name] || 'CommandBuilder'
|
13
14
|
@command_builders_dir = options[:command_builders_dir] || 'lib/command_builder'
|
14
15
|
end
|
15
16
|
|
@@ -49,10 +50,9 @@ module CommandBuilder
|
|
49
50
|
code_names = CommandCodeNames.new command, version
|
50
51
|
|
51
52
|
model = {
|
53
|
+
module_name: @module_name,
|
52
54
|
command_factory_method_signature: code_names.command_factory_method_signature,
|
53
55
|
version_factory_method_signature: code_names.version_factory_method_signature,
|
54
|
-
create_method_signature: code_names.create_method_signature,
|
55
|
-
create_method_call: code_names.create_method_call,
|
56
56
|
command_initializer_call: code_names.command_initializer_call,
|
57
57
|
command_module_name: code_names.command_module_name,
|
58
58
|
version_module_name: code_names.version_module_name,
|
@@ -34,14 +34,6 @@ module CommandBuilder
|
|
34
34
|
format_method version_factory_method_name, factory_method_args
|
35
35
|
end
|
36
36
|
|
37
|
-
def create_method_signature
|
38
|
-
format_method 'self.create', factory_method_args
|
39
|
-
end
|
40
|
-
|
41
|
-
def create_method_call
|
42
|
-
format_method "FluentCommandBuilder::#{command_module_name}::#{version_module_name}.create", initializer_values
|
43
|
-
end
|
44
|
-
|
45
37
|
def command_factory_method_call
|
46
38
|
format_method command_factory_method_name, initializer_values
|
47
39
|
end
|
@@ -4,11 +4,11 @@ require_relative '../internal/command_base'
|
|
4
4
|
require_relative '../internal/command_builder_config'
|
5
5
|
require_relative '../internal/underlying_builder'
|
6
6
|
|
7
|
-
module
|
7
|
+
module <%= model[:module_name] %>
|
8
8
|
module <%= model[:command_module_name] %>
|
9
9
|
module <%= model[:version_module_name] %>
|
10
10
|
VERSION = '<%= model[:version] %>'
|
11
|
-
@@config = CommandBuilderConfig.new
|
11
|
+
@@config = CommandBuilderConfig.new <%= model[:module_name] %>::<%= model[:command_module_name] %>::COMMAND_NAME, VERSION
|
12
12
|
def configure_<%= model[:factory_method_name] %>
|
13
13
|
yield @@config
|
14
14
|
end
|