Class: BaseAttribute
- Inherits:
-
Object
- Object
- BaseAttribute
- Defined in:
- lib/libisi/attribute/base.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/>.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#instance ⇒ Object
readonly
Returns the value of attribute instance.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(concept, name, options = {}) ⇒ BaseAttribute
constructor
A new instance of BaseAttribute.
- #type ⇒ Object
Constructor Details
#initialize(concept, name, options = {}) ⇒ BaseAttribute
Returns a new instance of BaseAttribute.
22 23 24 25 |
# File 'lib/libisi/attribute/base.rb', line 22 def initialize(concept, name, = {}) @concept = concept @name = name end |
Instance Attribute Details
#instance ⇒ Object (readonly)
Returns the value of attribute instance.
20 21 22 |
# File 'lib/libisi/attribute/base.rb', line 20 def instance @instance end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/libisi/attribute/base.rb', line 20 def name @name end |
Instance Method Details
#type ⇒ Object
27 28 29 30 31 |
# File 'lib/libisi/attribute/base.rb', line 27 def type method = "#{name}_type" return concept.send(method) if context.respond_to?(method) nil end |