class SpeakyCsv::Config

An instance of this class is yielded to the block passed to define_csv_fields. Used to configure speaky csv.

Attributes

export_only_fields[RW]
fields[RW]
has_manys[RW]
has_ones[RW]
primary_key[RW]
root[RW]

Public Class Methods

new(root: true) click to toggle source
# File lib/speaky_csv/config.rb, line 13
def initialize(root: true)
  @root = root
  @export_only_fields = []
  @fields = []
  @has_manys = {}
  @has_ones = {}
  @primary_key = :id
end

Public Instance Methods

dup() click to toggle source
Calls superclass method
# File lib/speaky_csv/config.rb, line 22
def dup
  other = super
  other.instance_variable_set '@has_manys', @has_manys.deep_dup
  other.instance_variable_set '@has_ones', @has_ones.deep_dup

  other
end