Class: Tipo::Info

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Info

Returns a new instance of Info.



13
14
15
16
# File 'lib/tipo.rb', line 13

def initialize file
  @font = Font.new file
  @header = Header.new font
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(table, *args, &block) ⇒ Object



18
19
20
21
# File 'lib/tipo.rb', line 18

def method_missing table, *args, &block
  table = "tipo/table/#{table}".camelize.constantize
  table.new @header, @font
end

Instance Attribute Details

#fontObject (readonly)

Returns the value of attribute font.



11
12
13
# File 'lib/tipo.rb', line 11

def font
  @font
end

#headerObject (readonly)

Returns the value of attribute header.



11
12
13
# File 'lib/tipo.rb', line 11

def header
  @header
end