- Joined
- Jun 7, 2013
- Messages
- 1,393
- Reaction score
- 210
- First Language
- English
Is this possible? If I have something like:
class Sample attr_reader
bj_info def initialize(obj_info = nil) if !obj_info.nil? @obj_info = obj_info else @obj_info = 0 end endendand then some where I would initialize this into something like:
Is it ever possible for me to use $sample_object_demonstration to pass obj_info param to the init? in say a script call?
class Sample attr_reader
Code:
$sample_object_demonstration = Sample.new
Last edited by a moderator:
