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