Class: BN::Middleware::D3::Profile

Inherits:
Base
  • Object
show all
Defined in:
lib/bn/middleware/d3/profile.rb

Overview

Transforms a Hash into an Entity::Profile instance.

Instance Method Summary collapse

Methods inherited from Base

execute, #initialize

Constructor Details

This class inherits a constructor from BN::Middleware::Base

Instance Method Details

#execute(data) ⇒ Entity::Profile

Execute the middleware.

Returns:

  • (Entity::Profile)


12
13
14
15
16
17
# File 'lib/bn/middleware/d3/profile.rb', line 12

def execute(data)
  convert_heroes(data)
  convert_time_played(data)

  Entity::D3::Profile.new(data)
end