Class: RubyIsds::Responses::Messages::Collection
- Inherits:
-
RubyIsds::Response
- Object
- RubyIsds::Response
- RubyIsds::Responses::Messages::Collection
- Defined in:
- lib/ruby_isds/responses/messages/collection.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
Returns the value of attribute messages.
Attributes inherited from RubyIsds::Response
Instance Method Summary collapse
-
#initialize(response) ⇒ Collection
constructor
A new instance of Collection.
- #load_messages ⇒ Object
Methods inherited from RubyIsds::Response
Constructor Details
Instance Attribute Details
#messages ⇒ Object
Returns the value of attribute messages.
5 6 7 |
# File 'lib/ruby_isds/responses/messages/collection.rb', line 5 def @messages end |
Instance Method Details
#load_messages ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/ruby_isds/responses/messages/collection.rb', line 13 def return [] if results.blank? return [::RubyIsds::DataMessage.new(results)] if results.is_a?(Hash) results.map do |result| ::RubyIsds::DataMessage.new(result) end end |