Class: DragonflySvg::Analysers::HeightAnalyser
- Defined in:
- lib/dragonfly_svg/analysers/height_analyser.rb
Instance Method Summary collapse
-
#initialize(app) ⇒ HeightAnalyser
constructor
A new instance of HeightAnalyser.
Methods inherited from Base
Constructor Details
#initialize(app) ⇒ HeightAnalyser
Returns a new instance of HeightAnalyser.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/dragonfly_svg/analysers/height_analyser.rb', line 4 def initialize(app) original = app.analysers.items[:height] app.add_analyser(:height) do |content| if is_svg?(content) content.analyse(:svg_properties)[:height] elsif original original.call(content) end end end |