=> Question
q1=Question.new("what's your first name?","subbu")
=> #
q1.question
q1[:question]
q1['question']
q1[0]
---------------------------
This means, I can treat my Struct based on what the situation demands. Sometimes I can treat it like an array or a hash or an object or a symbol.
No comments:
Post a Comment