class Devpad::CLI::Image
Public Instance Methods
create(path = '.')
click to toggle source
# File lib/devpad/cli/image.rb, line 14 def create(path = '.') params = options.slice('name', 'version', 'base', 'type', 'description', 'entrypoint', 'repl', 'private') params['path'] = path if options[:language].present? language_id = Integer(options[:language]) rescue nil if language_id.nil? params['language_id'] = Linguist::Language.find_by_name(options[:language])&.language_id end else params['language_id'] = nil end Devpad::CLI::Commands::Image::Create.new(shell: shell).execute(params) end