Class: RRTF::ShadingStyle

Inherits:
AnonymousStyle show all
Includes:
ShadingFormatting
Defined in:
lib/rrtf/style/shading_style.rb

Overview

Represents a set of formatting that can be applied to shade paragraphs.

Constant Summary

Constants included from ShadingFormatting

RRTF::ShadingFormatting::SHADING_ATTRIBUTES

Instance Method Summary collapse

Methods included from ShadingFormatting

included, #initialize_shading_formatting, #set_shading_formatting_from_hashmap, #shading_formatting_to_rtf

Methods inherited from AnonymousStyle

#push_colours, #push_fonts, #suffix

Constructor Details

#initialize(options = {}) ⇒ ShadingStyle

This is the constructor for the ShadingStyle class.

Parameters:

  • options (Hash) (defaults to: {})

    the shading style options.

Options Hash (options):

  • "sides" (String) — default: 'ALL'

    the sides to which the border applied (“ALL”, “LEFT”, “RIGHT”, “TOP”, or “BOTTOM”).



11
12
13
14
# File 'lib/rrtf/style/shading_style.rb', line 11

def initialize(options = {})
   super(options)
   initialize_shading_formatting(options)
end

Instance Method Details

#prefix(document) ⇒ Object

This method generates a string containing the prefix associated with the style object. Equivalent to #rtf_formatting for the ShadingStyle class.



18
19
20
# File 'lib/rrtf/style/shading_style.rb', line 18

def prefix(document)
  rtf_formatting(document)
end

#rtf_formatting(document) ⇒ Object



22
23
24
# File 'lib/rrtf/style/shading_style.rb', line 22

def rtf_formatting(document)
  shading_formatting_to_rtf(document)
end