Class: Coltrane::Renderers::TextRenderer::BaseDrawer

Inherits:
Object
  • Object
show all
Includes:
Color, Paint
Defined in:
lib/coltrane/renderers/text_renderer/base_drawer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, **options) ⇒ BaseDrawer

Returns a new instance of BaseDrawer.



10
11
12
13
14
15
16
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 10

def initialize(model, **options)
  @model   = model
  @options = options
  @flavor  = options[:flavor]  || :notes
  @layout  = options[:layout]  || :vertical
  @per_row = options[:per_row] || 4
end

Instance Attribute Details

#flavorObject (readonly)

Returns the value of attribute flavor.



8
9
10
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 8

def flavor
  @flavor
end

#layoutObject (readonly)

Returns the value of attribute layout.



8
9
10
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 8

def layout
  @layout
end

#modelObject (readonly)

Returns the value of attribute model.



8
9
10
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 8

def model
  @model
end

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 8

def options
  @options
end

#per_rowObject (readonly)

Returns the value of attribute per_row.



8
9
10
# File 'lib/coltrane/renderers/text_renderer/base_drawer.rb', line 8

def per_row
  @per_row
end