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.
15 16 17 |
# File 'lib/ponytail/schema.rb', line 15 def initialize(name=nil) @name = name end |
Instance Attribute Details
#name ⇒ Object (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 |
#columns ⇒ Object
19 20 21 |
# File 'lib/ponytail/schema.rb', line 19 def columns @columns ||= ActiveRecord::Base.connection.columns(name) end |