Skip to content

Support for +commands #19

@tmaier

Description

@tmaier

ImageSorcery only supports -commands, but there are also some +commands, like +repage

  def convert_to_arguments(args)
    special_args = [:layer, :annotate]
    args.reject {|k, v| special_args.include?(k) }.map {|k, v| " -#{k} '#{v}'"}
  end

https://github.com/EricR/image_sorcery/blob/master/lib/image_sorcery.rb#L135-L138

I would suggest following convention: If an argument is a symbol, it is an ordinary -command. If it is a string, the user takes care of the prefix by himself.

Alternative: Convert Symbol to string, check if it has a prefix (+ or -). If not, add -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions