Method: ActionDoc::Generator#read_action_yml
- Defined in:
- lib/actiondoc/generator.rb
#read_action_yml ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/actiondoc/generator.rb', line 71 def read_action_yml yaml = YAML.safe_load(File.read(@path_to_action_yml)).deep_symbolize_keys inputs = yaml.fetch(:inputs, {}).map do |k, v| Input.new(k, v[:description].chomp, v[:required] ? 'Required' : 'No', v[:default]) end Action.new(yaml[:name], yaml[:description].chomp, inputs) end |