Class: Orthoses::Outputable::UniqContentBody

Inherits:
Object
  • Object
show all
Defined in:
lib/orthoses/outputable/uniq_content_body.rb

Overview

UniqContentBody is an internal middleware It’s using on orthoses/outputable.rb

Instance Method Summary collapse

Constructor Details

#initialize(loader) ⇒ UniqContentBody

Returns a new instance of UniqContentBody.



8
9
10
# File 'lib/orthoses/outputable/uniq_content_body.rb', line 8

def initialize(loader)
  @loader = loader
end

Instance Method Details

#callObject



12
13
14
15
16
17
18
# File 'lib/orthoses/outputable/uniq_content_body.rb', line 12

def call
  @loader.call.tap do |store|
    store.each do |name, content|
      content.uniq!
    end
  end
end