class CTioga2::Graphics::Styles::StyleSheet::Bucket
A style bucket, a hash 'key' => 'value' associated with a unique xpath
Attributes
style[RW]
The style information (a string->string hash).
Not that it can actually be a string->typed stuff, since most types accept that !
xname[RW]
The xpath text initially used
xpath[RW]
All the XPath
associated with this style information
Public Class Methods
new(xp)
click to toggle source
# File lib/ctioga2/graphics/styles/stylesheet.rb, line 211 def initialize(xp) @xname = xp @xpath = XPath.from_text(xp) @style = {} end
Public Instance Methods
matches?(obj)
click to toggle source
# File lib/ctioga2/graphics/styles/stylesheet.rb, line 217 def matches?(obj) if @xpath.matches?(obj) return true else return false end end
normalized_style()
click to toggle source
Returns the style, but with all the options normalized to lowercase and without
# File lib/ctioga2/graphics/styles/stylesheet.rb, line 227 def normalized_style stl = {} for k,v in @style stl[k.gsub(/-/,"_").downcase] = v end return stl end