Class: Kickplan::Response

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/kickplan/response.rb

Direct Known Subclasses

Kickplan::Responses::Resolution

Class Method Summary collapse

Class Method Details

.wrap(attributes = {}) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/kickplan/response.rb', line 11

def self.wrap(attributes = {})
  if attributes.is_a? Hash
    new(attributes)
  else
    Array(attributes).map &method(:new)
  end
end