# Mini\_magick - 2 clarifications

**URL:** <https://www.ruby-forum.com/t/mini-magick-2-clarifications/178536>\
**Category:** Rails\
**Created:** [November 6, 2009, 4:47am UTC](https://www.ruby-forum.com/t/mini-magick-2-clarifications/178536 "2009-11-06T04:47:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [November 6, 2009, 4:47am UTC](https://www.ruby-forum.com/t/mini-magick-2-clarifications/178536/1 "2009-11-06T04:47:27Z")

</div>

1. I have seen examples similar to the following:

image = MiniMagick::Image.from\_file(“input.jpg”)  
image.resize “100x100”  
image.write(“output.jpg”)

I’m assuming that image.resize is a method. Is there any significance  
to the fact that the argument for that method is not enclosed in  
parenthesis while the other are? Examples seem to be consistent –  
way too consistent for coincidence.

1. When I resize an image, is there a way to do that operation in  
place so that I don’t have to write it out to a different file,  
conceptually like:

Thanks for any input.

```
     ... doug
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [November 7, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/mini-magick-2-clarifications/178536/2 "2009-11-07T15:35:43Z")

</div>

Paren use is optional except when required to disambiguate, i.e. when  
method1 takes two args and the first is method2 (which takes one or  
two args) you would use parens to group method2’s args.

It’s a Ruby thing. Can be tough to get used to if you’re coming from  
a c background and are used to the visual cue that parens provide.

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [November 8, 2009, 12:37am UTC](https://www.ruby-forum.com/t/mini-magick-2-clarifications/178536/3 "2009-11-08T00:37:39Z")

</div>

> It’s a Ruby thing. Can be tough to get used to

Yep. I understand and definitely agree that it’s a bit tough to get  
used to. The thing is, when the option to use parens when they’re not  
required is exercised (as in lines 1 and 3 of this example) and then,  
for no apprent reason, the option is not exercised in the intervening  
line 2, it leaves me to wonder if the author of the code knows  
something that I don’t. Hence the question.

Thanks for the response.

```
    ... doug
```
