Class: HecksDomain::Generators::Entity
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- HecksDomain::Generators::Entity
- Includes:
- Thor::Actions
- Defined in:
- lib/hecks/domain/generators/entity.rb
Instance Attribute Summary collapse
-
#aggregate ⇒ Object
readonly
Returns the value of attribute aggregate.
-
#aggregate_name ⇒ Object
readonly
Returns the value of attribute aggregate_name.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#domain_name ⇒ Object
readonly
Returns the value of attribute domain_name.
-
#domain_object ⇒ Object
readonly
Returns the value of attribute domain_object.
-
#domain_object_name ⇒ Object
readonly
Returns the value of attribute domain_object_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Entity
constructor
A new instance of Entity.
- #write_aggregate_directory ⇒ Object
Constructor Details
#initialize(args) ⇒ Entity
Returns a new instance of Entity.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/hecks/domain/generators/entity.rb', line 8 def initialize(args) @domain = args[0] @aggregate = args[1] @domain_object = args[2] @domain_name = @domain.name.to_s.underscore @aggregate_name = @aggregate.name.to_s.underscore @domain_object_name = @domain_object.name.to_s.underscore super end |
Instance Attribute Details
#aggregate ⇒ Object (readonly)
Returns the value of attribute aggregate.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def aggregate @aggregate end |
#aggregate_name ⇒ Object (readonly)
Returns the value of attribute aggregate_name.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def aggregate_name @aggregate_name end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def domain @domain end |
#domain_name ⇒ Object (readonly)
Returns the value of attribute domain_name.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def domain_name @domain_name end |
#domain_object ⇒ Object (readonly)
Returns the value of attribute domain_object.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def domain_object @domain_object end |
#domain_object_name ⇒ Object (readonly)
Returns the value of attribute domain_object_name.
6 7 8 |
# File 'lib/hecks/domain/generators/entity.rb', line 6 def domain_object_name @domain_object_name end |
Class Method Details
.source_root ⇒ Object
21 22 23 |
# File 'lib/hecks/domain/generators/entity.rb', line 21 def self.source_root File.dirname(__FILE__) + '/../templates' end |
Instance Method Details
#write_aggregate_directory ⇒ Object
25 26 27 |
# File 'lib/hecks/domain/generators/entity.rb', line 25 def write_aggregate_directory directory('entity', 'domain') end |