Class: Ukiryu::Models::Invocation

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/ukiryu/models/invocation.rb

Overview

Invocation configuration for tool commands

Defines how a tool is invoked - whether as a direct executable or with subcommands, and whether it provides multiple tools.

Examples:

Direct invocation

invocation = Invocation.new(type: 'direct')

Subcommand invocation (ImageMagick 7.x)

invocation = Invocation.new(
  type: 'subcommand',
  multi_call: true
)

Multi-call binary (BusyBox)

invocation = Invocation.new(
  type: 'subcommand',
  multi_call: true,
  symlink_detection: true
)

Instance Method Summary collapse

Instance Method Details

#direct?Boolean

Check if this is a direct invocation

Returns:

  • (Boolean)

    true if type is ‘direct’



55
56
57
# File 'lib/ukiryu/models/invocation.rb', line 55

def direct?
  type == 'direct'
end

#multi_call?Boolean

Check if this is a multi-call binary

Returns:

  • (Boolean)

    true if multi_call is true



69
70
71
# File 'lib/ukiryu/models/invocation.rb', line 69

def multi_call?
  multi_call == true
end

#subcommand?Boolean

Check if this is a subcommand invocation

Returns:

  • (Boolean)

    true if type is ‘subcommand’



62
63
64
# File 'lib/ukiryu/models/invocation.rb', line 62

def subcommand?
  type == 'subcommand'
end