class Ayadn::SetFormats

Public Class Methods

new() click to toggle source
Calls superclass method Ayadn::SetBase::new
# File lib/ayadn/set.rb, line 344
def initialize
  super
  @category = 'formats'
end

Public Instance Methods

list(args) click to toggle source
# File lib/ayadn/set.rb, line 371
def list(args)
  type = args.shift.downcase
  value = args[0]
  if type == 'reverse' || type == 'reversed'
    @input = 'list reverse'
    @output = Validators.boolean(value)
    Settings.options.formats.list.reverse = @output
  else
    @status.error_missing_parameters
    exit
  end
end
lists(args) click to toggle source
# File lib/ayadn/set.rb, line 384
def lists(args)
  list(args)
end
table(args) click to toggle source
# File lib/ayadn/set.rb, line 349
def table(args)
  type = args.shift.downcase
  if type == 'width'
    value = args[0].to_i
    @input = 'table width'
    @output = Validators.width_range(value)
    Settings.options.formats.table.width = @output
  elsif type == 'borders' || type == 'border'
    value = args[0]
    @input = 'table borders'
    @output = Validators.boolean(value)
    Settings.options.formats.table.borders = @output
  else
    @status.error_missing_parameters
    exit
  end
end
tables(args) click to toggle source
# File lib/ayadn/set.rb, line 367
def tables(args)
  table(args)
end