Class: Shomen::Model::Attribute
- Inherits:
-
Method
- Object
- AbstractPrime
- Abstract
- Method
- Shomen::Model::Attribute
- Defined in:
- lib/shomen/model/attribute.rb
Instance Attribute Summary collapse
-
#rw ⇒ Object
‘R’, ‘W’ or ‘RW’.
Attributes inherited from Method
#alias_for, #aliases, #comment, #declarations, #dynamic, #file, #format, #interfaces, #language, #line, #name, #namespace, #raises, #returns, #singleton, #source
Attributes inherited from Abstract
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Attribute
constructor
A new instance of Attribute.
Methods inherited from Method
Methods inherited from Abstract
Methods inherited from AbstractPrime
#[], #[]=, attr_accessor, #to_h
Constructor Details
#initialize(settings = {}) ⇒ Attribute
Returns a new instance of Attribute.
13 14 15 16 |
# File 'lib/shomen/model/attribute.rb', line 13 def initialize(settings={}) super(settings) self['!'] = settings['singleton'] ? 'class-attribute' : 'attribute' end |
Instance Attribute Details
#rw ⇒ Object
‘R’, ‘W’ or ‘RW’
19 20 21 |
# File 'lib/shomen/model/attribute.rb', line 19 def rw @rw end |
Class Method Details
.type ⇒ Object
10 |
# File 'lib/shomen/model/attribute.rb', line 10 def self.type; 'attribute'; end |