Class: Acbaker::Processors::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/acbaker/processors/base.rb

Direct Known Subclasses

Center, Contain, Cover

Constant Summary collapse

@@defaults =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(asset_pack, options = {}) ⇒ Base

Returns a new instance of Base.



7
8
9
10
# File 'lib/acbaker/processors/base.rb', line 7

def initialize(asset_pack, options={})
  @asset_pack = asset_pack
  @options = options ? @@defaults.merge(options) : @@defaults
end

Instance Attribute Details

#asset_packObject

Returns the value of attribute asset_pack.



4
5
6
# File 'lib/acbaker/processors/base.rb', line 4

def asset_pack
  @asset_pack
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/acbaker/processors/base.rb', line 4

def options
  @options
end

Instance Method Details

#run(image, image_spec, width = nil, height = nil) ⇒ Object



12
13
14
# File 'lib/acbaker/processors/base.rb', line 12

def run(image, image_spec, width=nil, height=nil)
  throw "Acbaker::Processors::Base should be extended"
end