Sha256: a61e328c70434fc2c5dd2d6fd3cdf7a0756f32bc7bdb56aba9315542892da4b4
Contents?: true
Size: 1.02 KB
Versions: 5
Compression:
Stored size: 1.02 KB
Contents
require 'xmlss/style/base' module Xmlss::Style class Font def self.writer; :font; end include Enumeration enum :underline, { :single => 'Single', :double => 'Double', :single_accounting => 'SingleAccounting', :double_accounting => 'DoubleAccounting' } enum :alignment, { :subscript => 'Subscript', :superscript => 'Superscript' } attr_accessor :bold, :color, :italic, :size, :strike_through, :shadow, :name def initialize(attrs={}) self.bold = attrs[:bold] || false self.color = attrs[:color] self.italic = attrs[:italic] || false self.size = attrs[:size] self.strike_through = attrs[:strike_through] || false self.shadow = attrs[:shadow] || false self.underline = attrs[:underline] self.alignment = attrs[:alignment] self.name = attrs[:name] end def bold?; !!self.bold; end def italic?; !!self.italic; end def strike_through?; !!self.strike_through; end def shadow?; !!self.shadow; end end end
Version data entries
5 entries across 5 versions & 1 rubygems