Class: Roseflow::LinkedIn::Person::Experience

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/roseflow/linkedin/person/experience.rb

Defined Under Namespace

Classes: ExperienceContract

Class Method Summary collapse

Class Method Details

.new(input) ⇒ Object

Raises:

  • (ArgumentError)


65
66
67
68
69
# File 'lib/roseflow/linkedin/person/experience.rb', line 65

def self.new(input)
  validation = self.contract_object.new.call(input)
  raise ArgumentError, validation.errors.to_h unless validation.success?
  super(validation.to_h)
end