Static variable


#1

Who declare static variable in ruby ?

thks


Ítalo Matos


#2

Italo M. wrote:

Who declare static variable in ruby ?

http://www.google.com/search?q=ruby+static+variable


Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!


#3

Hi –

On Sat, 27 Jan 2007, Italo M. wrote:

Who declare static variable in ruby ?

The words “static” and “Ruby” don’t mix very well :slight_smile: Do you mean a
class variable? Or a constant?

David


Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
(See what readers are saying! http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)


#4

Hi –

On Sat, 27 Jan 2007, Italo M. wrote:

Constant …

Constants are defined in a class or module. I don’t know what further
information you need, based on your question, but that’s the most
basic point.

David


Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
(See what readers are saying! http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)


#5

Constant …

thks

2007/1/27, removed_email_address@domain.invalid removed_email_address@domain.invalid:


Ítalo Matos


#6

Example in Java :

public class Service {
public static final int EMAIL = 1;
public static final int SMS = 2;
}

2007/1/27, removed_email_address@domain.invalid removed_email_address@domain.invalid:

basic point.


Ítalo Matos


#7

On Jan 27, 2007, at 12:26 PM, Italo M. wrote:

Example in Java :

public class Service {
public static final int EMAIL = 1;
public static final int SMS = 2;
}

module Service
EMAIL = 1
SMS = 2
end

referenced later as:
Service::EMAIL
and
Service::SMS

-Rob

Rob B. http://agileconsultingllc.com
removed_email_address@domain.invalid