A little confused, what exactly is the point of the exercise --- Is
it simply to introduce variables ?
It says in the text that this exercise is to reinforce the point that
quote : "The variables in your function are not connected to the
variables in your script." --- what does this sentence mean ?
On 18.04.2016 20:24, Cai Gengyang wrote:
A little confused, what exactly is the point of the exercise --- Is
it simply to introduce variables ?
It says in the text that this exercise is to reinforce the point that
quote : "The variables in your function are not connected to the
variables in your script." --- what does this sentence mean ?
Apparently it tries to teach you the concept of "scope". But there is
more text on the page that should help you understand. It seems to be
called "... the hard way" for a reason... :-)
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Might be missing something, but I don't see the word "scope" in the
text. Is there a good simple , easy to understand definition of scope
online on a website somewhere ?
On 18.04.2016 23:25, Cai Gengyang wrote:
Might be missing something, but I don't see the word "scope" in the
text. Is there a good simple , easy to understand definition of scope online on a website somewhere ?
Yes.
robert
--
remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
This is what I found --- http://apidock.com/rails/ActiveRecord/NamedScope/ClassMethods/scope
But still don't see the link to exercise 19 --- There's no scope in it !
Lol ...
On Tuesday, April 19, 2016 at 5:36:36 AM UTC+8, Robert Klemme wrote:
On 18.04.2016 23:25, Cai Gengyang wrote:
Might be missing something, but I don't see the word "scope" in the
text. Is there a good simple , easy to understand definition of scope online on a website somewhere ?
Yes.
robert
--
remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 75:42:25 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,646 |
Posted today: | 1 |