Class: KStarter::Questions::Svelte

Inherits:
BaseQuestion show all
Defined in:
lib/k_starter/questions/svelte.rb

Overview

Ask code generations for a new GEM.

Instance Attribute Summary

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

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) ⇒ Svelte

Returns a new instance of Svelte.



7
8
9
10
# File 'lib/k_starter/questions/svelte.rb', line 7

def initialize(**args)
  args = { type: :svelte }.merge(args)
  super(**args)
end

Instance Method Details

#ask_questionsObject



12
13
14
15
16
17
18
19
# File 'lib/k_starter/questions/svelte.rb', line 12

def ask_questions
  ask_name
  ask_root_path
  ask_github_key
  ask_description
  story_questions
  klue_template_questions
end

#to_domObject



28
29
30
# File 'lib/k_starter/questions/svelte.rb', line 28

def to_dom
  KStarter::Schema::SvelteProject.new(to_h)
end

#to_hObject



21
22
23
24
25
26
# File 'lib/k_starter/questions/svelte.rb', line 21

def to_h
  super.merge(
    {
    }
  )
end