Class: Shomen::Model::Attribute

Inherits:
Method show all
Defined in:
lib/shomen/model/attribute.rb

Instance Attribute Summary collapse

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

#path, #tags

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

#to_h

Methods inherited from Abstract

#type

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

#rwObject

‘R’, ‘W’ or ‘RW’



19
20
21
# File 'lib/shomen/model/attribute.rb', line 19

def rw
  @rw
end

Class Method Details

.typeObject



10
# File 'lib/shomen/model/attribute.rb', line 10

def self.type; 'attribute'; end