Class: Clef::Renderer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/clef/renderer/base.rb

Direct Known Subclasses

PdfRenderer, SvgRenderer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(style: Clef::Engraving::Style.default, glyph_table: Clef::Engraving::GlyphTable.new, font_manager: Clef::Engraving::FontManager.new) ⇒ Base

Returns a new instance of Base.

Parameters:



11
12
13
14
15
16
17
# File 'lib/clef/renderer/base.rb', line 11

def initialize(style: Clef::Engraving::Style.default,
  glyph_table: Clef::Engraving::GlyphTable.new,
  font_manager: Clef::Engraving::FontManager.new)
  @style = style
  @glyph_table = glyph_table
  @font_manager = font_manager
end

Instance Attribute Details

#font_managerObject (readonly)

Returns the value of attribute font_manager.



6
7
8
# File 'lib/clef/renderer/base.rb', line 6

def font_manager
  @font_manager
end

#glyph_tableObject (readonly)

Returns the value of attribute glyph_table.



6
7
8
# File 'lib/clef/renderer/base.rb', line 6

def glyph_table
  @glyph_table
end

#styleObject (readonly)

Returns the value of attribute style.



6
7
8
# File 'lib/clef/renderer/base.rb', line 6

def style
  @style
end

Instance Method Details

#render(_score, _path, **_options) ⇒ Object

Parameters:

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/clef/renderer/base.rb', line 21

def render(_score, _path, **_options)
  raise NotImplementedError
end