Class: Awsm::Tablulatrix

Inherits:
Object
  • Object
show all
Defined in:
lib/awsm/configure.rb

Instance Method Summary collapse

Constructor Details

#initializeTablulatrix

Returns a new instance of Tablulatrix.



82
83
84
85
# File 'lib/awsm/configure.rb', line 82

def initialize
  @use_fields = []
  @fields = {}
end

Instance Method Details

#add_field(name, heading, &block) ⇒ Object



95
96
97
98
99
100
# File 'lib/awsm/configure.rb', line 95

def add_field( name, heading, &block )
  @fields[ name ] = {
    heading: heading,
    block: block
  }
end

#fieldsObject



102
103
104
# File 'lib/awsm/configure.rb', line 102

def fields
  return @fields
end

#use_fields(fields = nil) ⇒ Object



87
88
89
90
91
92
93
# File 'lib/awsm/configure.rb', line 87

def use_fields( fields=nil )
  if fields.nil?
    return @use_fields
  end

  @use_fields = fields
end