Class: Soybean::CLI
- Inherits:
-
Thor
- Object
- Thor
- Soybean::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/soybean/cli.rb
Instance Method Summary collapse
Instance Method Details
#service(wsdl, dir) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/soybean/cli.rb', line 24 def service(wsdl, dir) opts = raise 'PATH_TO_WSDL should be a exists wsdl file or directory with wsdl`s' unless File.exists? wsdl full_path = File. wsdl, FileUtils.pwd if File.directory? full_path Dir["#{full_path}/*.wsdl"].each do |file| generate_service(file, dir, opts) end else generate_service(full_path, dir, opts) end end |
#types(location, destination = '.') ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/soybean/cli.rb', line 13 def types(location, destination = '.') Soybean::Generators::TypesGenerator.new(URI.parse(location)).generate do |filename, content| if [:remove] remove_file File.join(destination, filename), else create_file File.join(destination, filename), content, end end end |