On Wed, Dec 10, 2014 at 10:15 PM, D. Deryl Downey <me / daviddwdowney.com> wrote:
> In ruby there is only public and private. A constant is not meant to be
> modified. You can but the interpreter will complain.

Right.

> There is no protected as there is in Java.

Wrong.

$ ruby -e 'class Foo; def x; p bar; end; protected; def bar; 123; end;
end; Foo.new.x'
123
$ ruby -e 'class Foo; def x; p bar; end; protected; def bar; 123; end;
end; Foo.new.x; Foo.new.bar'
123
-e:1:in `<main>': protected method `bar' called for
#<Foo:0x00000600425b20> (NoMethodError)

> There is no one to one translation from Java to ruby.

Right.

Cheers

robert

-- 
[guy, jim].each {|him| remember.him do |as, often| as.you_can - without end}
http://blog.rubybestpractices.com/