Module: EasyAxlsx::ClassConfig::ClassMethods
- Defined in:
- lib/easy_axlsx/class_config.rb
Instance Method Summary collapse
- #as_easy_axlsx_field(arg) ⇒ Object
- #as_easy_axlsx_fields(*args) ⇒ Object
- #as_easy_axlsx_widths(*args) ⇒ Object
-
#easy_axlsx_fields ⇒ Array
private
Method names, use for generate axlsx rows.
-
#easy_axlsx_widths ⇒ Array
private
Widths axlsx columns.
Instance Method Details
#as_easy_axlsx_field(arg) ⇒ Object
13 14 15 16 17 |
# File 'lib/easy_axlsx/class_config.rb', line 13 def as_easy_axlsx_field(arg) easy_axlsx_check_instance_method(arg) @easy_axlsx_fields = easy_axlsx_fields << arg end |
#as_easy_axlsx_fields(*args) ⇒ Object
7 8 9 10 11 |
# File 'lib/easy_axlsx/class_config.rb', line 7 def as_easy_axlsx_fields(*args) args.each { |arg| easy_axlsx_check_instance_method(arg) } @easy_axlsx_fields = args end |
#as_easy_axlsx_widths(*args) ⇒ Object
25 26 27 |
# File 'lib/easy_axlsx/class_config.rb', line 25 def as_easy_axlsx_widths(*args) @easy_axlsx_widths = args.map { |arg| Float(arg) } end |
#easy_axlsx_fields ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns method names, use for generate axlsx rows.
21 22 23 |
# File 'lib/easy_axlsx/class_config.rb', line 21 def easy_axlsx_fields Array(@easy_axlsx_fields) end |
#easy_axlsx_widths ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns widths axlsx columns.
31 32 33 |
# File 'lib/easy_axlsx/class_config.rb', line 31 def easy_axlsx_widths Array(@easy_axlsx_widths) end |