Class: Rubysmith::CLI::Configuration::Content
- Inherits:
-
Struct
- Object
- Struct
- Rubysmith::CLI::Configuration::Content
- Defined in:
- lib/rubysmith/cli/configuration/content.rb
Overview
Defines the common configuration content for use throughout the gem.
Instance Attribute Summary collapse
-
#author_email ⇒ Object
Returns the value of attribute author_email.
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#author_url ⇒ Object
Returns the value of attribute author_url.
-
#build_amazing_print ⇒ Object
Returns the value of attribute build_amazing_print.
-
#build_bundler_audit ⇒ Object
Returns the value of attribute build_bundler_audit.
-
#build_bundler_leak ⇒ Object
Returns the value of attribute build_bundler_leak.
-
#build_console ⇒ Object
Returns the value of attribute build_console.
-
#build_documentation ⇒ Object
Returns the value of attribute build_documentation.
-
#build_git ⇒ Object
Returns the value of attribute build_git.
-
#build_git_lint ⇒ Object
Returns the value of attribute build_git_lint.
-
#build_guard ⇒ Object
Returns the value of attribute build_guard.
-
#build_minimum ⇒ Object
Returns the value of attribute build_minimum.
-
#build_pry ⇒ Object
Returns the value of attribute build_pry.
-
#build_reek ⇒ Object
Returns the value of attribute build_reek.
-
#build_refinements ⇒ Object
Returns the value of attribute build_refinements.
-
#build_root ⇒ Object
Returns the value of attribute build_root.
-
#build_rspec ⇒ Object
Returns the value of attribute build_rspec.
-
#build_rubocop ⇒ Object
Returns the value of attribute build_rubocop.
-
#build_ruby_critic ⇒ Object
Returns the value of attribute build_ruby_critic.
-
#build_setup ⇒ Object
Returns the value of attribute build_setup.
-
#build_simple_cov ⇒ Object
Returns the value of attribute build_simple_cov.
-
#builders_pragmater_comments ⇒ Object
Returns the value of attribute builders_pragmater_comments.
-
#builders_pragmater_includes ⇒ Object
Returns the value of attribute builders_pragmater_includes.
-
#config ⇒ Object
Returns the value of attribute config.
-
#documentation_format ⇒ Object
Returns the value of attribute documentation_format.
-
#documentation_license ⇒ Object
Returns the value of attribute documentation_license.
-
#help ⇒ Object
Returns the value of attribute help.
-
#now ⇒ Object
Returns the value of attribute now.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#template_path ⇒ Object
Returns the value of attribute template_path.
-
#template_root ⇒ Object
Returns the value of attribute template_root.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(*arguments) ⇒ Content
constructor
A new instance of Content.
- #project_class ⇒ Object
- #project_label ⇒ Object
- #project_root ⇒ Object
- #to_pathway ⇒ Object
- #with(attributes) ⇒ Object
Constructor Details
#initialize(*arguments) ⇒ Content
Returns a new instance of Content.
47 48 49 50 51 52 53 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 47 def initialize *arguments super self[:template_root] ||= Pathname(__dir__).join("../../templates"). self[:build_root] ||= Pathname.pwd freeze end |
Instance Attribute Details
#author_email ⇒ Object
Returns the value of attribute author_email
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def @author_email end |
#author_name ⇒ Object
Returns the value of attribute author_name
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def @author_name end |
#author_url ⇒ Object
Returns the value of attribute author_url
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def @author_url end |
#build_amazing_print ⇒ Object
Returns the value of attribute build_amazing_print
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_amazing_print @build_amazing_print end |
#build_bundler_audit ⇒ Object
Returns the value of attribute build_bundler_audit
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_bundler_audit @build_bundler_audit end |
#build_bundler_leak ⇒ Object
Returns the value of attribute build_bundler_leak
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_bundler_leak @build_bundler_leak end |
#build_console ⇒ Object
Returns the value of attribute build_console
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_console @build_console end |
#build_documentation ⇒ Object
Returns the value of attribute build_documentation
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_documentation @build_documentation end |
#build_git ⇒ Object
Returns the value of attribute build_git
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_git @build_git end |
#build_git_lint ⇒ Object
Returns the value of attribute build_git_lint
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_git_lint @build_git_lint end |
#build_guard ⇒ Object
Returns the value of attribute build_guard
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_guard @build_guard end |
#build_minimum ⇒ Object
Returns the value of attribute build_minimum
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_minimum @build_minimum end |
#build_pry ⇒ Object
Returns the value of attribute build_pry
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_pry @build_pry end |
#build_reek ⇒ Object
Returns the value of attribute build_reek
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_reek @build_reek end |
#build_refinements ⇒ Object
Returns the value of attribute build_refinements
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_refinements @build_refinements end |
#build_root ⇒ Object
Returns the value of attribute build_root
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_root @build_root end |
#build_rspec ⇒ Object
Returns the value of attribute build_rspec
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_rspec @build_rspec end |
#build_rubocop ⇒ Object
Returns the value of attribute build_rubocop
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_rubocop @build_rubocop end |
#build_ruby_critic ⇒ Object
Returns the value of attribute build_ruby_critic
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_ruby_critic @build_ruby_critic end |
#build_setup ⇒ Object
Returns the value of attribute build_setup
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_setup @build_setup end |
#build_simple_cov ⇒ Object
Returns the value of attribute build_simple_cov
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def build_simple_cov @build_simple_cov end |
#builders_pragmater_comments ⇒ Object
Returns the value of attribute builders_pragmater_comments
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def builders_pragmater_comments @builders_pragmater_comments end |
#builders_pragmater_includes ⇒ Object
Returns the value of attribute builders_pragmater_includes
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def builders_pragmater_includes @builders_pragmater_includes end |
#config ⇒ Object
Returns the value of attribute config
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def config @config end |
#documentation_format ⇒ Object
Returns the value of attribute documentation_format
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def documentation_format @documentation_format end |
#documentation_license ⇒ Object
Returns the value of attribute documentation_license
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def documentation_license @documentation_license end |
#help ⇒ Object
Returns the value of attribute help
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def help @help end |
#now ⇒ Object
Returns the value of attribute now
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def now @now end |
#project_name ⇒ Object
Returns the value of attribute project_name
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def project_name @project_name end |
#template_path ⇒ Object
Returns the value of attribute template_path
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def template_path @template_path end |
#template_root ⇒ Object
Returns the value of attribute template_root
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def template_root @template_root end |
#version ⇒ Object
Returns the value of attribute version
10 11 12 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 10 def version @version end |
Instance Method Details
#project_class ⇒ Object
59 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 59 def project_class = project_name.camelcase |
#project_label ⇒ Object
57 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 57 def project_label = project_name.titleize |
#project_root ⇒ Object
61 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 61 def project_root = build_root.join(project_name) |
#to_pathway ⇒ Object
63 64 65 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 63 def to_pathway Pathway[start_root: template_root, start_path: template_path, end_root: build_root] end |
#with(attributes) ⇒ Object
55 |
# File 'lib/rubysmith/cli/configuration/content.rb', line 55 def with(attributes) = self.class.new(to_h.merge(attributes)) |