Class: Writexlsx::Format::FormatState
- Inherits:
-
Object
- Object
- Writexlsx::Format::FormatState
- Defined in:
- lib/write_xlsx/format/format_state.rb
Instance Attribute Summary collapse
-
#alignment ⇒ Object
Returns the value of attribute alignment.
-
#border ⇒ Object
Returns the value of attribute border.
-
#dxf_bg_color ⇒ Object
Returns the value of attribute dxf_bg_color.
-
#dxf_fg_color ⇒ Object
Returns the value of attribute dxf_fg_color.
-
#dxf_index ⇒ Object
Returns the value of attribute dxf_index.
-
#fill ⇒ Object
Returns the value of attribute fill.
-
#font ⇒ Object
Returns the value of attribute font.
-
#has_border ⇒ Object
Returns the value of attribute has_border.
-
#has_dxf_border ⇒ Object
Returns the value of attribute has_dxf_border.
-
#has_dxf_fill ⇒ Object
Returns the value of attribute has_dxf_fill.
-
#has_dxf_font ⇒ Object
Returns the value of attribute has_dxf_font.
-
#has_fill ⇒ Object
Returns the value of attribute has_fill.
-
#has_font ⇒ Object
Returns the value of attribute has_font.
-
#number_format ⇒ Object
Returns the value of attribute number_format.
-
#protection ⇒ Object
Returns the value of attribute protection.
-
#quote_prefix ⇒ Object
Returns the value of attribute quote_prefix.
-
#used_as_dxf ⇒ Object
Returns the value of attribute used_as_dxf.
-
#xf_id ⇒ Object
Returns the value of attribute xf_id.
-
#xf_index ⇒ Object
Returns the value of attribute xf_index.
Instance Method Summary collapse
-
#initialize ⇒ FormatState
constructor
A new instance of FormatState.
- #initialize_copy(other) ⇒ Object
Constructor Details
#initialize ⇒ FormatState
Returns a new instance of FormatState.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/write_xlsx/format/format_state.rb', line 15 def initialize @fill = FillState.new @border = BorderState.new @font = FontState.new @alignment = AlignmentState.new @protection = ProtectionState.new @number_format = NumberFormatState.new @xf_index = nil @dxf_index = nil @xf_id = 0 @quote_prefix = 0 @has_fill = false @has_font = false @has_border = false @has_dxf_fill = false @has_dxf_font = false @has_dxf_border = false @dxf_fg_color = nil @dxf_bg_color = nil @used_as_dxf = false end |
Instance Attribute Details
#alignment ⇒ Object
Returns the value of attribute alignment.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def alignment @alignment end |
#border ⇒ Object
Returns the value of attribute border.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def border @border end |
#dxf_bg_color ⇒ Object
Returns the value of attribute dxf_bg_color.
12 13 14 |
# File 'lib/write_xlsx/format/format_state.rb', line 12 def dxf_bg_color @dxf_bg_color end |
#dxf_fg_color ⇒ Object
Returns the value of attribute dxf_fg_color.
12 13 14 |
# File 'lib/write_xlsx/format/format_state.rb', line 12 def dxf_fg_color @dxf_fg_color end |
#dxf_index ⇒ Object
Returns the value of attribute dxf_index.
8 9 10 |
# File 'lib/write_xlsx/format/format_state.rb', line 8 def dxf_index @dxf_index end |
#fill ⇒ Object
Returns the value of attribute fill.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def fill @fill end |
#font ⇒ Object
Returns the value of attribute font.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def font @font end |
#has_border ⇒ Object
Returns the value of attribute has_border.
10 11 12 |
# File 'lib/write_xlsx/format/format_state.rb', line 10 def has_border @has_border end |
#has_dxf_border ⇒ Object
Returns the value of attribute has_dxf_border.
11 12 13 |
# File 'lib/write_xlsx/format/format_state.rb', line 11 def has_dxf_border @has_dxf_border end |
#has_dxf_fill ⇒ Object
Returns the value of attribute has_dxf_fill.
11 12 13 |
# File 'lib/write_xlsx/format/format_state.rb', line 11 def has_dxf_fill @has_dxf_fill end |
#has_dxf_font ⇒ Object
Returns the value of attribute has_dxf_font.
11 12 13 |
# File 'lib/write_xlsx/format/format_state.rb', line 11 def has_dxf_font @has_dxf_font end |
#has_fill ⇒ Object
Returns the value of attribute has_fill.
10 11 12 |
# File 'lib/write_xlsx/format/format_state.rb', line 10 def has_fill @has_fill end |
#has_font ⇒ Object
Returns the value of attribute has_font.
10 11 12 |
# File 'lib/write_xlsx/format/format_state.rb', line 10 def has_font @has_font end |
#number_format ⇒ Object
Returns the value of attribute number_format.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def number_format @number_format end |
#protection ⇒ Object
Returns the value of attribute protection.
7 8 9 |
# File 'lib/write_xlsx/format/format_state.rb', line 7 def protection @protection end |
#quote_prefix ⇒ Object
Returns the value of attribute quote_prefix.
9 10 11 |
# File 'lib/write_xlsx/format/format_state.rb', line 9 def quote_prefix @quote_prefix end |
#used_as_dxf ⇒ Object
Returns the value of attribute used_as_dxf.
13 14 15 |
# File 'lib/write_xlsx/format/format_state.rb', line 13 def used_as_dxf @used_as_dxf end |
#xf_id ⇒ Object
Returns the value of attribute xf_id.
8 9 10 |
# File 'lib/write_xlsx/format/format_state.rb', line 8 def xf_id @xf_id end |
#xf_index ⇒ Object
Returns the value of attribute xf_index.
8 9 10 |
# File 'lib/write_xlsx/format/format_state.rb', line 8 def xf_index @xf_index end |
Instance Method Details
#initialize_copy(other) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/write_xlsx/format/format_state.rb', line 40 def initialize_copy(other) @fill = other.fill&.dup @border = other.border&.dup @font = other.font&.dup @alignment = other.alignment&.dup @protection = other.protection&.dup @number_format = other.number_format&.dup @xf_index = nil @dxf_index = nil @xf_id = other.xf_id @quote_prefix = other.quote_prefix @has_fill = false @has_font = false @has_border = false @has_dxf_fill = false @has_dxf_font = false @has_dxf_border = false @dxf_fg_color = other.dxf_fg_color @dxf_bg_color = other.dxf_bg_color @used_as_dxf = other.used_as_dxf end |