Class: Foobara::Generators::CommandGenerator::CommandConfig
- Defined in:
- foobara-command-generator-0.0.3/src/command_config.rb
Constant Summary
Constants inherited from Model
Instance Attribute Summary collapse
-
#command_path ⇒ Object
Returns the value of attribute command_path.
-
#full_module_name ⇒ Object
Returns the value of attribute full_module_name.
-
#original_attributes ⇒ Object
Returns the value of attribute original_attributes.
Attributes inherited from Model
Instance Method Summary collapse
- #command_name ⇒ Object
- #full_module_path ⇒ Object
-
#initialize ⇒ CommandConfig
constructor
A new instance of CommandConfig.
- #module_path ⇒ Object
Methods inherited from Model
#==, abstract, abstract?, attribute_names, #attributes, #attributes_with_delegates, #cast_attribute, #cast_attribute!, closest_namespace_module, description, domain, domain_name, #eql?, foobara_model_name, foobara_name, full_model_name, #hash, install!, organization_name, possible_errors, #read_attribute, #read_attribute!, reset_all, subclass, #to_h, #to_json, #valid?, valid_attribute_name?, #validate!, validate_attribute_name!, #validation_errors, #write_attribute, #write_attribute!, #write_attributes, #write_attributes!
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Constructor Details
#initialize ⇒ CommandConfig
Returns a new instance of CommandConfig.
18 19 20 21 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 18 def initialize(...) super update_names end |
Instance Attribute Details
#command_path ⇒ Object
Returns the value of attribute command_path.
16 17 18 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 16 def command_path @command_path end |
#full_module_name ⇒ Object
Returns the value of attribute full_module_name.
16 17 18 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 16 def full_module_name @full_module_name end |
#original_attributes ⇒ Object
Returns the value of attribute original_attributes.
16 17 18 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 16 def original_attributes @original_attributes end |
Instance Method Details
#command_name ⇒ Object
[View source]
27 28 29 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 27 def command_name @command_name ||= command_path.join("::") end |
#full_module_path ⇒ Object
[View source]
31 32 33 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 31 def full_module_path @full_module_path ||= full_module_name.split("::") end |
#module_path ⇒ Object
[View source]
23 24 25 |
# File 'foobara-command-generator-0.0.3/src/command_config.rb', line 23 def module_path @module_path ||= full_module_name.split("::") end |