Class: Prawn::Text::Oval

Inherits:
Formatted::Oval show all
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

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, options={})
  super([{ :text => string }], options)
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