Class: Ponytail::Table

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ Table

Returns a new instance of Table.



15
16
17
# File 'lib/ponytail/schema.rb', line 15

def initialize(name=nil)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/ponytail/schema.rb', line 14

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



23
24
25
# File 'lib/ponytail/schema.rb', line 23

def ==(other)
  name == other.name
end

#columnsObject



19
20
21
# File 'lib/ponytail/schema.rb', line 19

def columns
  @columns ||= ActiveRecord::Base.connection.columns(name)
end