Class: ActiverecordAttribute

Inherits:
BaseAttribute show all
Defined in:
lib/libisi/attribute/activerecord.rb

Overview

Copyright © 2007-2010 Logintas AG Switzerland

This file is part of Libisi.

Libisi is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Libisi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Libisi. If not, see <www.gnu.org/licenses/>.

Instance Attribute Summary

Attributes inherited from BaseAttribute

#instance

Instance Method Summary collapse

Constructor Details

#initialize(concept, column, options = {}) ⇒ ActiverecordAttribute

Returns a new instance of ActiverecordAttribute.



22
23
24
25
# File 'lib/libisi/attribute/activerecord.rb', line 22

def initialize(concept, column, options = {})
  @activerecord_column = column
  super(concept, column.name, options)    
end

Instance Method Details

#nameObject



20
# File 'lib/libisi/attribute/activerecord.rb', line 20

def name; @activerecord_column.name; end

#typeObject



27
28
29
# File 'lib/libisi/attribute/activerecord.rb', line 27

def type
  @activerecord_column.type
end

#unitObject



30
31
32
# File 'lib/libisi/attribute/activerecord.rb', line 30

def unit
  return nil
end