Class: Middleman::Imageoptim::ResourceList

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-imageoptim/resource_list.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, resources, options) ⇒ ResourceList

Returns a new instance of ResourceList.



10
11
12
13
14
# File 'lib/middleman-imageoptim/resource_list.rb', line 10

def initialize(app, resources, options)
  @app = app
  @resources = resources
  @options = options
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



4
5
6
# File 'lib/middleman-imageoptim/resource_list.rb', line 4

def app
  @app
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/middleman-imageoptim/resource_list.rb', line 4

def options
  @options
end

Class Method Details

.manipulate(app, resources, options) ⇒ Object



6
7
8
# File 'lib/middleman-imageoptim/resource_list.rb', line 6

def self.manipulate(app, resources, options)
  new(app, resources, options).manipulate_resources
end

Instance Method Details

#manipulate_resourcesObject



16
17
18
# File 'lib/middleman-imageoptim/resource_list.rb', line 16

def manipulate_resources
  modified_resources << manifest_resource
end