Class: Prawn::Text::Oval
- Inherits:
-
Formatted::Oval
- Object
- Formatted::Box
- Formatted::Oval
- Prawn::Text::Oval
- Defined in:
- lib/prawn_oval_text/oval.rb
Overview
Provides oval shaped text capacity
Constant Summary
Constants inherited from Formatted::Oval
Formatted::Oval::DEFAULT_CROP_INCREMENT
Instance Method Summary collapse
-
#initialize(string, options = {}) ⇒ Oval
constructor
A new instance of Oval.
- #render(flags = {}) ⇒ Object
Methods inherited from Formatted::Oval
#available_width, #valid_options
Constructor Details
#initialize(string, options = {}) ⇒ Oval
Returns a new instance of Oval.
60 61 62 |
# File 'lib/prawn_oval_text/oval.rb', line 60 def initialize(string, ={}) super([{ :text => string }], ) end |
Instance Method Details
#render(flags = {}) ⇒ Object
64 65 66 67 |
# File 'lib/prawn_oval_text/oval.rb', line 64 def render(flags={}) leftover = super(flags) leftover.collect { |hash| hash[:text] }.join end |