Class: MiniMagick::CommandBuilder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommandBuilder

Returns a new instance of CommandBuilder.



134
135
136
# File 'lib/mini_magick.rb', line 134

def initialize
  @args = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object



138
139
140
141
# File 'lib/mini_magick.rb', line 138

def method_missing(symbol, *args)
  @args << "-#{symbol}"
  @args += args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



132
133
134
# File 'lib/mini_magick.rb', line 132

def args
  @args
end

Instance Method Details

#+(value) ⇒ Object



143
144
145
# File 'lib/mini_magick.rb', line 143

def +(value)
  @args << "+#{value}"
end