Class: TypeProf::Core::ValueEntity
- Inherits:
-
Object
- Object
- TypeProf::Core::ValueEntity
- Defined in:
- lib/typeprof/core/env/value_entity.rb
Instance Attribute Summary collapse
-
#decls ⇒ Object
readonly
Returns the value of attribute decls.
-
#defs ⇒ Object
readonly
Returns the value of attribute defs.
-
#read_boxes ⇒ Object
readonly
Returns the value of attribute read_boxes.
-
#vtx ⇒ Object
readonly
Returns the value of attribute vtx.
Instance Method Summary collapse
- #add_decl(decl) ⇒ Object
- #add_def(def_) ⇒ Object
- #exist? ⇒ Boolean
-
#initialize ⇒ ValueEntity
constructor
A new instance of ValueEntity.
- #remove_decl(decl) ⇒ Object
- #remove_def(def_) ⇒ Object
Constructor Details
Instance Attribute Details
#decls ⇒ Object (readonly)
Returns the value of attribute decls.
10 11 12 |
# File 'lib/typeprof/core/env/value_entity.rb', line 10 def decls @decls end |
#defs ⇒ Object (readonly)
Returns the value of attribute defs.
10 11 12 |
# File 'lib/typeprof/core/env/value_entity.rb', line 10 def defs @defs end |
#read_boxes ⇒ Object (readonly)
Returns the value of attribute read_boxes.
10 11 12 |
# File 'lib/typeprof/core/env/value_entity.rb', line 10 def read_boxes @read_boxes end |
#vtx ⇒ Object (readonly)
Returns the value of attribute vtx.
10 11 12 |
# File 'lib/typeprof/core/env/value_entity.rb', line 10 def vtx @vtx end |
Instance Method Details
#add_decl(decl) ⇒ Object
12 13 14 |
# File 'lib/typeprof/core/env/value_entity.rb', line 12 def add_decl(decl) @decls << decl end |
#add_def(def_) ⇒ Object
20 21 22 |
# File 'lib/typeprof/core/env/value_entity.rb', line 20 def add_def(def_) @defs << def_ end |
#exist? ⇒ Boolean
28 29 30 |
# File 'lib/typeprof/core/env/value_entity.rb', line 28 def exist? !@decls.empty? || !@defs.empty? end |
#remove_decl(decl) ⇒ Object
16 17 18 |
# File 'lib/typeprof/core/env/value_entity.rb', line 16 def remove_decl(decl) @decls.delete(decl) || raise end |
#remove_def(def_) ⇒ Object
24 25 26 |
# File 'lib/typeprof/core/env/value_entity.rb', line 24 def remove_def(def_) @defs.delete(def_) || raise end |