E
Eye Matz
class Important
def set_this_value_method(value)
end
end
class SemiImportant < Important
set_this_value_method :something_or_anything
end
Could some kind sould please, please take the time to explain the
fundamentals of Ruby's class/module functionality in regards to the
above example.
I'm a photographer/php 'programmer' so I speak fairly good English, but
very little geek speak, so please don't assume too much. Having said
the above, I've created fairly complex class structures/frameworks in
PHP, so I'm not completely dense, although grepping Ruby's syntax
certainly makes me feel that way.
I have the books "Pickaxe", "Ruby for Rails" & "AWDR" and I have tried
to read my way to an answer, but these books are designed for
programmers, and not visual people like myself, so hence I can't see the
answers in them, even though they may well be in there.
To give you the context of my question, please consider this Rails code
example:
class DumbNewbie < ActiveRecord::Base
has_many :questions
end
Hope I've been clear, yet succinct, enough to not waste too much
bandwith. I'll be extremely grateful for anyone taking the time to get
me over this major hurdle.
def set_this_value_method(value)
end
end
class SemiImportant < Important
set_this_value_method :something_or_anything
end
Could some kind sould please, please take the time to explain the
fundamentals of Ruby's class/module functionality in regards to the
above example.
I'm a photographer/php 'programmer' so I speak fairly good English, but
very little geek speak, so please don't assume too much. Having said
the above, I've created fairly complex class structures/frameworks in
PHP, so I'm not completely dense, although grepping Ruby's syntax
certainly makes me feel that way.
I have the books "Pickaxe", "Ruby for Rails" & "AWDR" and I have tried
to read my way to an answer, but these books are designed for
programmers, and not visual people like myself, so hence I can't see the
answers in them, even though they may well be in there.
To give you the context of my question, please consider this Rails code
example:
class DumbNewbie < ActiveRecord::Base
has_many :questions
end
Hope I've been clear, yet succinct, enough to not waste too much
bandwith. I'll be extremely grateful for anyone taking the time to get
me over this major hurdle.