Module: EasyAxlsx::ClassConfig::ClassMethods

Defined in:
lib/easy_axlsx/class_config.rb

Instance Method Summary collapse

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_fieldsArray

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.

Returns:

  • (Array)

    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_widthsArray

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.

Returns:

  • (Array)

    widths axlsx columns



31
32
33
# File 'lib/easy_axlsx/class_config.rb', line 31

def easy_axlsx_widths
  Array(@easy_axlsx_widths)
end