Class: HecksDomain::Generators::DomainFiles
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- HecksDomain::Generators::DomainFiles
- Includes:
- Thor::Actions
- Defined in:
- lib/hecks/domain/generators/domain_files.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#domain_name ⇒ Object
readonly
Returns the value of attribute domain_name.
-
#gemspec ⇒ Object
readonly
Returns the value of attribute gemspec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ DomainFiles
constructor
A new instance of DomainFiles.
- #write_gemspec ⇒ Object
Constructor Details
#initialize(args) ⇒ DomainFiles
Returns a new instance of DomainFiles.
8 9 10 11 12 13 14 |
# File 'lib/hecks/domain/generators/domain_files.rb', line 8 def initialize(args) @domain = args.first @gemspec = @domain.gemspec @domain_name = @domain.name.to_s.underscore super end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
6 7 8 |
# File 'lib/hecks/domain/generators/domain_files.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/domain_files.rb', line 6 def domain_name @domain_name end |
#gemspec ⇒ Object (readonly)
Returns the value of attribute gemspec.
6 7 8 |
# File 'lib/hecks/domain/generators/domain_files.rb', line 6 def gemspec @gemspec end |
Class Method Details
.source_root ⇒ Object
18 19 20 |
# File 'lib/hecks/domain/generators/domain_files.rb', line 18 def self.source_root File.dirname(__FILE__) + '/../templates' end |
Instance Method Details
#write_gemspec ⇒ Object
22 23 24 25 |
# File 'lib/hecks/domain/generators/domain_files.rb', line 22 def write_gemspec template('%domain_name%.gemspec.tt') directory('lib') end |