# Newbie syntax questions

**URL:** <https://www.ruby-forum.com/t/newbie-syntax-questions/68312>\
**Category:** Ruby\
**Created:** [September 11, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/newbie-syntax-questions/68312 "2006-09-11T17:56:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 11, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/newbie-syntax-questions/68312/1 "2006-09-11T17:56:35Z")

</div>

Hi

In the ‘test/unit’ library the file unit.rb contains the following code.

module Test  
module Unit  
def self.run=(flag)  
@run = flag  
end

```
def self.run?
  @run ||= false
end

```

end  
end

at\_exit do  
unless $! || Test::Unit.run?  
exit Test::Unit::AutoRunner.run($0 != “-e” && $0)  
end  
end

Could someone please explain the following:

1. Why is there an equals sign in the code “def self.run=(flag)” and  
what  
does it do?

2. Why is there an equals sign in the code “@run ||= false” and what  
does  
it do?

3. Why is the ‘run’ member of the ‘Unit’ module accessible on the line "  
unless $! || Test::Unit.run?"? Doesn’t this require the attr\_reader  
syntax  
in the module?

4. What does “$0 != “-e” && $0” mean and do?

Thanks
