Class: Table

Inherits:
Object
  • Object
show all
Defined in:
lib/fathom/archive/n3.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*variables) ⇒ Table

Returns a new instance of Table.



68
69
70
71
72
73
74
# File 'lib/fathom/archive/n3.rb', line 68

def initialize(*variables)
  @columns = variables.map {|v| v.name}
  @variables = variables
  @legend = @variables.inject([]) do |list, e|
    list = list.expand(e)
  end
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.



67
68
69
# File 'lib/fathom/archive/n3.rb', line 67

def columns
  @columns
end

#legendObject (readonly)

Returns the value of attribute legend.



67
68
69
# File 'lib/fathom/archive/n3.rb', line 67

def legend
  @legend
end

#variablesObject (readonly)

Returns the value of attribute variables.



67
68
69
# File 'lib/fathom/archive/n3.rb', line 67

def variables
  @variables
end