Class: Foobara::Generators::CommandGenerator::CommandConfig

Inherits:
Model
  • Object
show all
Defined in:
foobara-command-generator-0.0.3/src/command_config.rb

Constant Summary

Constants inherited from Model

Model::ALLOWED_OPTIONS

Instance Attribute Summary collapse

Attributes inherited from Model

#mutable, #skip_validations

Instance Method Summary collapse

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

#initializeCommandConfig

Returns a new instance of CommandConfig.

[View source]

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_pathObject

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_nameObject

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_attributesObject

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_nameObject

[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_pathObject

[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_pathObject

[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