Class: KStarter::Questions::BaseGem
- Inherits:
-
BaseQuestion
- Object
- BaseQuestion
- KStarter::Questions::BaseGem
- Defined in:
- lib/k_starter/questions/gem.rb
Overview
Ask code generations for a new GEM.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#coc ⇒ Object
readonly
has code of conduct.
-
#exe ⇒ Object
readonly
has executable folder.
-
#mit ⇒ Object
readonly
has MIT license.
-
#rspec ⇒ Object
readonly
has rspec tests.
Attributes inherited from BaseQuestion
#actor, #description, #github_key, #klue_template_active, #klue_template_name, #name, #problem, #root_path, #solution, #story_active, #sub_path, #type, #user_story, #variant
Instance Method Summary collapse
- #ask_questions ⇒ Object
-
#initialize(**args) ⇒ BaseGem
constructor
A new instance of BaseGem.
- #to_dom ⇒ Object
- #to_h ⇒ Object
Methods inherited from BaseQuestion
#ask_actor, #ask_description, #ask_github_key, #ask_klue_template_active?, #ask_klue_template_name, #ask_problem, #ask_root_path, #ask_solution, #ask_story_active?, #ask_sub_path, #ask_user_story, #default_klue_template_active, #default_questions, #default_story_active, #infer_klue_template_name, #klue_template_questions, #show_story, #story_questions
Methods included from TtyHelpers
#command, #config, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which
Constructor Details
#initialize(**args) ⇒ BaseGem
Returns a new instance of BaseGem.
12 13 14 15 |
# File 'lib/k_starter/questions/gem.rb', line 12 def initialize(**args) args = { type: :gem }.merge(args) super(**args) end |
Instance Attribute Details
#coc ⇒ Object (readonly)
has code of conduct
8 9 10 |
# File 'lib/k_starter/questions/gem.rb', line 8 def coc @coc end |
#exe ⇒ Object (readonly)
has executable folder
7 8 9 |
# File 'lib/k_starter/questions/gem.rb', line 7 def exe @exe end |
#mit ⇒ Object (readonly)
has MIT license
9 10 11 |
# File 'lib/k_starter/questions/gem.rb', line 9 def mit @mit end |
#rspec ⇒ Object (readonly)
has rspec tests
10 11 12 |
# File 'lib/k_starter/questions/gem.rb', line 10 def rspec @rspec end |
Instance Method Details
#ask_questions ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/k_starter/questions/gem.rb', line 17 def ask_questions ask_name ask_root_path ask_github_key ask_description story_questions klue_template_questions ask_exe ask_coc ask_mit ask_rspec end |
#to_dom ⇒ Object
42 43 44 |
# File 'lib/k_starter/questions/gem.rb', line 42 def to_dom KStarter::Schema::GemProject.new(to_h) end |
#to_h ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/k_starter/questions/gem.rb', line 31 def to_h super.merge( { exe: exe, coc: coc, mit: mit, rspec: rspec } ) end |