Class: Rfsms::ReportAnswer
Defined Under Namespace
Classes: SMS
Instance Attribute Summary collapse
-
#sms ⇒ Object
readonly
Returns the value of attribute sms.
Attributes inherited from Answer
Instance Method Summary collapse
-
#initialize(body) ⇒ ReportAnswer
constructor
A new instance of ReportAnswer.
Constructor Details
#initialize(body) ⇒ ReportAnswer
Returns a new instance of ReportAnswer.
159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/rfsms.rb', line 159 def initialize(body) super(body) @sms = case @sms when Hash [SMS.new(@sms)] when Array @sms.map {|sms| SMS.new(sms) } else [] end end |
Instance Attribute Details
#sms ⇒ Object (readonly)
Returns the value of attribute sms.
137 138 139 |
# File 'lib/rfsms.rb', line 137 def sms @sms end |