Module: SequencescapeExcel::Helpers::Attributes::ClassMethods

Defined in:
app/sequencescape_excel/sequencescape_excel/helpers/attributes.rb

Overview

ClassMethods

Instance Method Summary collapse

Instance Method Details

#setup_attributes(*attributes) ⇒ Object


17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/sequencescape_excel/sequencescape_excel/helpers/attributes.rb', line 17

def setup_attributes(*attributes)
  options = attributes.extract_options!

  attr_accessor(*attributes)

  define_method :attributes do
    attributes
  end

  define_method :default_attributes do
    options[:defaults] || {}
  end
end