class Excelizer::Attribute

Attributes

header[W]
name[RW]

Public Class Methods

new(name, options) click to toggle source
# File lib/excelizer/attribute.rb, line 6
def initialize(name, options)
  self.name = name
  self.header = options[:header] unless options[:header].nil?
end

Public Instance Methods

header() click to toggle source
# File lib/excelizer/attribute.rb, line 11
def header
  (@header || default_header)
end

Private Instance Methods

default_header() click to toggle source
# File lib/excelizer/attribute.rb, line 19
def default_header
  name.to_s.split("_").map(&:capitalize).join(" ")
end