Class: Magnetize::CLI
- Inherits:
-
Thor
- Object
- Thor
- Magnetize::CLI
- Defined in:
- lib/magnetize/cli.rb
Instance Method Summary collapse
Instance Method Details
#to_magento ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/magnetize/cli.rb', line 13 def to_magento unless [:type] && [:input] && [:output] Magnetize::Convert.new.to_magento write: true else Magnetize::Convert.new.to_magento write: true, types: { [:type] => { :magento => [:output], :toml => [:input] }} end end |
#to_toml ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/magnetize/cli.rb', line 28 def to_toml Dir.chdir([:dir]) do unless [:type] && [:input] && [:output] Magnetize::Convert.new.to_toml write: true else Magnetize::Convert.new.to_toml write: true, types: { [:type] => { :magento => [:input], :toml => [:output] }} end end end |