Class: Ree::Object
Instance Attribute Summary collapse
-
#after_init ⇒ Object
readonly
Returns the value of attribute after_init.
-
#benchmark_config ⇒ Object
readonly
Returns the value of attribute benchmark_config.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#compiled_frozen ⇒ Object
readonly
Returns the value of attribute compiled_frozen.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#factory ⇒ Object
readonly
Returns the value of attribute factory.
-
#freeze ⇒ Object
readonly
Returns the value of attribute freeze.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#linked_const_list ⇒ Object
readonly
Returns the value of attribute linked_const_list.
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#mount_as ⇒ Object
readonly
Returns the value of attribute mount_as.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#on_link ⇒ Object
readonly
Returns the value of attribute on_link.
-
#package_name ⇒ Object
readonly
Returns the value of attribute package_name.
-
#rpath ⇒ Object
readonly
Returns the value of attribute rpath.
-
#schema_rpath ⇒ Object
readonly
Returns the value of attribute schema_rpath.
-
#singleton ⇒ Object
readonly
Returns the value of attribute singleton.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#with_caller ⇒ Object
readonly
Returns the value of attribute with_caller.
Instance Method Summary collapse
-
#add_const_list(list) ⇒ ArrayOf[String]
All imported constants.
- #add_tags(list) ⇒ Object
- #after_init? ⇒ Boolean
- #benchmark? ⇒ Boolean
- #compiled? ⇒ Boolean
- #factory? ⇒ Boolean
- #fn? ⇒ Boolean
- #freeze? ⇒ Boolean
-
#initialize(name, schema_rpath, rpath) ⇒ Object
constructor
A new instance of Object.
- #loaded? ⇒ Boolean
- #object? ⇒ Boolean
- #reset ⇒ Object
- #set_after_init(val) ⇒ Object
- #set_as_compiled(frozen) ⇒ Object
- #set_as_not_compiled ⇒ Object
- #set_as_singleton ⇒ Object
- #set_as_with_caller ⇒ Object
- #set_benchmark_config(config) ⇒ Object
- #set_class(klass) ⇒ Object
- #set_factory(val) ⇒ Object
- #set_freeze(val) ⇒ Object
- #set_loaded ⇒ Object
- #set_mount_as(val) ⇒ Object
- #set_on_link(block) ⇒ Object
- #set_package(val) ⇒ Object
- #set_rpath(val) ⇒ Object
- #set_schema_rpath(val) ⇒ Object
- #set_target(val) ⇒ Object
- #singleton? ⇒ Boolean
- #with_caller? ⇒ Boolean
Constructor Details
#initialize(name, schema_rpath, rpath) ⇒ Object
Returns a new instance of Object.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ree/core/object.rb', line 14 def initialize(name, schema_rpath, rpath) @name = name @schema_rpath = schema_rpath @rpath = rpath @links = [] @errors = [] @target = :object @loaded = false @freeze = true @compiled = false @singleton = false @with_caller = false @compiled_frozen = @freeze @linked_const_list = [] @tags = [] @benchmark_config = nil @on_link = nil end |
Instance Attribute Details
#after_init ⇒ Object (readonly)
Returns the value of attribute after_init.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def after_init @after_init end |
#benchmark_config ⇒ Object (readonly)
Returns the value of attribute benchmark_config.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def benchmark_config @benchmark_config end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def class_name @class_name end |
#compiled_frozen ⇒ Object (readonly)
Returns the value of attribute compiled_frozen.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def compiled_frozen @compiled_frozen end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def errors @errors end |
#factory ⇒ Object (readonly)
Returns the value of attribute factory.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def factory @factory end |
#freeze ⇒ Object (readonly)
Returns the value of attribute freeze.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def freeze @freeze end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def klass @klass end |
#linked_const_list ⇒ Object (readonly)
Returns the value of attribute linked_const_list.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def linked_const_list @linked_const_list end |
#links ⇒ Object (readonly)
Returns the value of attribute links.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def links @links end |
#mount_as ⇒ Object (readonly)
Returns the value of attribute mount_as.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def mount_as @mount_as end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def name @name end |
#on_link ⇒ Object (readonly)
Returns the value of attribute on_link.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def on_link @on_link end |
#package_name ⇒ Object (readonly)
Returns the value of attribute package_name.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def package_name @package_name end |
#rpath ⇒ Object (readonly)
Returns the value of attribute rpath.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def rpath @rpath end |
#schema_rpath ⇒ Object (readonly)
Returns the value of attribute schema_rpath.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def schema_rpath @schema_rpath end |
#singleton ⇒ Object (readonly)
Returns the value of attribute singleton.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def singleton @singleton end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def @tags end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def target @target end |
#with_caller ⇒ Object (readonly)
Returns the value of attribute with_caller.
4 5 6 |
# File 'lib/ree/core/object.rb', line 4 def with_caller @with_caller end |
Instance Method Details
#add_const_list(list) ⇒ ArrayOf[String]
Returns All imported constants.
51 52 53 54 |
# File 'lib/ree/core/object.rb', line 51 def add_const_list(list) @linked_const_list += list @linked_const_list.uniq end |
#add_tags(list) ⇒ Object
169 170 171 172 |
# File 'lib/ree/core/object.rb', line 169 def (list) @tags += list @tags.uniq! end |
#after_init? ⇒ Boolean
79 80 81 |
# File 'lib/ree/core/object.rb', line 79 def after_init? !!@after_init end |
#benchmark? ⇒ Boolean
165 166 167 |
# File 'lib/ree/core/object.rb', line 165 def benchmark? !!@benchmark_config end |
#compiled? ⇒ Boolean
71 72 73 |
# File 'lib/ree/core/object.rb', line 71 def compiled? @compiled end |
#factory? ⇒ Boolean
75 76 77 |
# File 'lib/ree/core/object.rb', line 75 def factory? !!@factory end |
#fn? ⇒ Boolean
127 128 129 |
# File 'lib/ree/core/object.rb', line 127 def fn? @mount_as == :fn end |
#freeze? ⇒ Boolean
91 92 93 |
# File 'lib/ree/core/object.rb', line 91 def freeze? @freeze end |
#loaded? ⇒ Boolean
87 88 89 |
# File 'lib/ree/core/object.rb', line 87 def loaded? @loaded end |
#object? ⇒ Boolean
123 124 125 |
# File 'lib/ree/core/object.rb', line 123 def object? @mount_as == :object end |
#reset ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ree/core/object.rb', line 33 def reset @compiled = false @singleton = false @with_caller = false @target = :object @loaded = false @factory = nil @after_init = nil @freeze = true @links = [] @errors = [] @linked_const_list = [] @benchmark_config = nil @on_link = nil end |
#set_after_init(val) ⇒ Object
157 158 159 |
# File 'lib/ree/core/object.rb', line 157 def set_after_init(val) @after_init = val; self end |
#set_as_compiled(frozen) ⇒ Object
57 58 59 60 |
# File 'lib/ree/core/object.rb', line 57 def set_as_compiled(frozen) @compiled = true @compiled_frozen = frozen end |
#set_as_not_compiled ⇒ Object
62 63 64 65 |
# File 'lib/ree/core/object.rb', line 62 def set_as_not_compiled @compiled = false @compiled_frozen = @freeze end |
#set_as_singleton ⇒ Object
114 115 116 |
# File 'lib/ree/core/object.rb', line 114 def set_as_singleton @singleton = true; self end |
#set_as_with_caller ⇒ Object
119 120 121 |
# File 'lib/ree/core/object.rb', line 119 def set_as_with_caller @with_caller = true; self end |
#set_benchmark_config(config) ⇒ Object
161 162 163 |
# File 'lib/ree/core/object.rb', line 161 def set_benchmark_config(config) @benchmark_config = config; self end |
#set_class(klass) ⇒ Object
142 143 144 |
# File 'lib/ree/core/object.rb', line 142 def set_class(klass) @klass = klass; @class_name = klass.to_s; self end |
#set_factory(val) ⇒ Object
152 153 154 |
# File 'lib/ree/core/object.rb', line 152 def set_factory(val) @factory = val; self end |
#set_freeze(val) ⇒ Object
110 111 112 |
# File 'lib/ree/core/object.rb', line 110 def set_freeze(val) @freeze = val; self end |
#set_loaded ⇒ Object
83 84 85 |
# File 'lib/ree/core/object.rb', line 83 def set_loaded @loaded = true end |
#set_mount_as(val) ⇒ Object
105 106 107 |
# File 'lib/ree/core/object.rb', line 105 def set_mount_as(val) @mount_as = val; self end |
#set_on_link(block) ⇒ Object
175 176 177 |
# File 'lib/ree/core/object.rb', line 175 def set_on_link(block) @on_link = block end |
#set_package(val) ⇒ Object
147 148 149 |
# File 'lib/ree/core/object.rb', line 147 def set_package(val) @package_name = val; self end |
#set_rpath(val) ⇒ Object
132 133 134 |
# File 'lib/ree/core/object.rb', line 132 def set_rpath(val) @rpath = val; self end |
#set_schema_rpath(val) ⇒ Object
137 138 139 |
# File 'lib/ree/core/object.rb', line 137 def set_schema_rpath(val) @schema_rpath = val; self end |
#set_target(val) ⇒ Object
100 101 102 |
# File 'lib/ree/core/object.rb', line 100 def set_target(val) @target = val; self end |
#singleton? ⇒ Boolean
95 96 97 |
# File 'lib/ree/core/object.rb', line 95 def singleton? @singleton end |
#with_caller? ⇒ Boolean
67 68 69 |
# File 'lib/ree/core/object.rb', line 67 def with_caller? @with_caller end |