Class: Ponytail::Table
- Inherits:
-
Object
- Object
- Ponytail::Table
- Defined in:
- lib/ponytail/schema.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #columns ⇒ Object
-
#initialize(name = nil) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(name = nil) ⇒ Table
Returns a new instance of Table.
10 11 12 |
# File 'lib/ponytail/schema.rb', line 10 def initialize(name=nil) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/ponytail/schema.rb', line 9 def name @name end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 |
# File 'lib/ponytail/schema.rb', line 18 def ==(other) name == other.name end |
#columns ⇒ Object
14 15 16 |
# File 'lib/ponytail/schema.rb', line 14 def columns @columns ||= ActiveRecord::Base.connection.columns(name) end |