Class: Archimate::DataModel::Layer
- Inherits:
-
Object
- Object
- Archimate::DataModel::Layer
- Defined in:
- lib/archimate/data_model/layer.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #===(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(layer = "None", element_names = []) ⇒ Layer
constructor
No user serviceable parts here.
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
7 8 9 |
# File 'lib/archimate/data_model/layer.rb', line 7 def elements @elements end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/archimate/data_model/layer.rb', line 8 def name @name end |
Instance Method Details
#==(other) ⇒ Object
35 36 37 |
# File 'lib/archimate/data_model/layer.rb', line 35 def ==(other) @symbol == other&.to_sym end |
#===(other) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/archimate/data_model/layer.rb', line 21 def ===(other) return true if equal?(other) case other when String @symbol == Layer.symbolize(other) when Symbol @symbol == other when Layer self == other else false end end |
#hash ⇒ Object
17 18 19 |
# File 'lib/archimate/data_model/layer.rb', line 17 def hash self.class.hash ^ @symbol.hash end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/archimate/data_model/layer.rb', line 43 def to_s @name end |
#to_sym ⇒ Object
39 40 41 |
# File 'lib/archimate/data_model/layer.rb', line 39 def to_sym @symbol end |