Class: Xmlss::Style::Font
- Inherits:
-
Object
- Object
- Xmlss::Style::Font
- Includes:
- Enumeration
- Defined in:
- lib/xmlss/style/font.rb
Instance Attribute Summary collapse
-
#bold ⇒ Object
Returns the value of attribute bold.
-
#color ⇒ Object
Returns the value of attribute color.
-
#italic ⇒ Object
Returns the value of attribute italic.
-
#name ⇒ Object
Returns the value of attribute name.
-
#shadow ⇒ Object
Returns the value of attribute shadow.
-
#size ⇒ Object
Returns the value of attribute size.
-
#strike_through ⇒ Object
Returns the value of attribute strike_through.
Class Method Summary collapse
Instance Method Summary collapse
- #bold? ⇒ Boolean
-
#initialize(attrs = {}) ⇒ Font
constructor
A new instance of Font.
- #italic? ⇒ Boolean
- #shadow? ⇒ Boolean
- #strike_through? ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ Font
Returns a new instance of Font.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/xmlss/style/font.rb', line 22 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 |
Instance Attribute Details
#bold ⇒ Object
Returns the value of attribute bold.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def bold @bold end |
#color ⇒ Object
Returns the value of attribute color.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def color @color end |
#italic ⇒ Object
Returns the value of attribute italic.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def italic @italic end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def name @name end |
#shadow ⇒ Object
Returns the value of attribute shadow.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def shadow @shadow end |
#size ⇒ Object
Returns the value of attribute size.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def size @size end |
#strike_through ⇒ Object
Returns the value of attribute strike_through.
20 21 22 |
# File 'lib/xmlss/style/font.rb', line 20 def strike_through @strike_through end |
Class Method Details
.writer ⇒ Object
6 |
# File 'lib/xmlss/style/font.rb', line 6 def self.writer; :font; end |
Instance Method Details
#bold? ⇒ Boolean
34 |
# File 'lib/xmlss/style/font.rb', line 34 def bold?; !!self.bold; end |
#italic? ⇒ Boolean
35 |
# File 'lib/xmlss/style/font.rb', line 35 def italic?; !!self.italic; end |
#shadow? ⇒ Boolean
37 |
# File 'lib/xmlss/style/font.rb', line 37 def shadow?; !!self.shadow; end |
#strike_through? ⇒ Boolean
36 |
# File 'lib/xmlss/style/font.rb', line 36 def strike_through?; !!self.strike_through; end |