Class: Vips::Operation

Inherits:
Object
  • Object
show all
Defined in:
lib/vips/operation.rb

Overview

add a conventience method to Operation

Instance Method Summary collapse

Instance Method Details

#get_argsObject

Fetch arg list, remove boring ones, sort into priority order.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vips/operation.rb', line 7

def get_args
    gobject_class = gtype.to_class
    props = gobject_class.properties.select do |name|
        flags = get_argument_flags name
        io = ((flags & :input) | (flags & :output)) != 0
        dep = (flags & :deprecated) != 0
        io & (not dep)
    end
    args = props.map {|name| Argument.new self, name}
    args.sort! {|a, b| a.priority - b.priority}
end