module RichText::Styleable
Public Instance Methods
bold=(b)
click to toggle source
Sets bold to either true or false, depending on the given argument.
# File lib/richtext/styleable.rb, line 12 def bold=(b) self[:bold] = b ? true : false end
bold?()
click to toggle source
Returns true if bold formatting is applied.
# File lib/richtext/styleable.rb, line 6 def bold? self[:bold] end
color()
click to toggle source
Returns the color value if it is set, otherwise nil.
# File lib/richtext/styleable.rb, line 46 def color self[:color] end
color=(c)
click to toggle source
Sets the color value.
# File lib/richtext/styleable.rb, line 52 def color=(c) self[:color] = c end
font()
click to toggle source
Returns the font value if it is set, otherwise nil.
# File lib/richtext/styleable.rb, line 58 def font self[:font] end
font=(f)
click to toggle source
Sets the font value.
# File lib/richtext/styleable.rb, line 64 def font=(f) self[:font] = f end
italic=(i)
click to toggle source
Sets italic to either true or false, depending on the given argument.
# File lib/richtext/styleable.rb, line 24 def italic=(i) self[:italic] = i ? true : false end
italic?()
click to toggle source
Returns true if italic formatting is applied.
# File lib/richtext/styleable.rb, line 18 def italic? self[:italic] end
underlined=(u)
click to toggle source
Sets underlined to either true or false, depending on the given argument.
# File lib/richtext/styleable.rb, line 38 def underlined=(u) self[:underlined] = u ? true : false end
Also aliased as: underline=
underlined?()
click to toggle source
Returns true if underlined formatting is applied.
# File lib/richtext/styleable.rb, line 30 def underlined? self[:underlined] end
Also aliased as: underline?