class ThousandIsland::StyleHash
A subclass of Hash, automatically adds keys that mirror other keys to allow for a couple of small differences in the Prawn options hashes:
:font_style = :style :styles = :style and puts it into an Array
Public Class Methods
new(style={})
click to toggle source
Calls superclass method
# File lib/thousand_island/utilities/style_hash.rb, line 7 def initialize(style={}) super() self.merge!(style) end
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
# File lib/thousand_island/utilities/style_hash.rb, line 12 def [](key) return self[:size] if key == :font_size return [self[:style]] if key == :styles super end