Class: Ree::Object
Instance Attribute Summary collapse
-
#after_init ⇒ Object
readonly
Returns the value of attribute after_init.
-
#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.
-
#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
- #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_class(klass) ⇒ Object
- #set_factory(val) ⇒ Object
- #set_freeze(val) ⇒ Object
- #set_loaded ⇒ Object
- #set_mount_as(val) ⇒ 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.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ree/core/object.rb', line 13 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 = [] 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 |
#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 |
#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.
46 47 48 49 |
# File 'lib/ree/core/object.rb', line 46 def add_const_list(list) @linked_const_list += list @linked_const_list.uniq end |
#add_tags(list) ⇒ Object
156 157 158 159 |
# File 'lib/ree/core/object.rb', line 156 def (list) @tags += list @tags.uniq! end |
#after_init? ⇒ Boolean
74 75 76 |
# File 'lib/ree/core/object.rb', line 74 def after_init? !!@after_init end |
#compiled? ⇒ Boolean
66 67 68 |
# File 'lib/ree/core/object.rb', line 66 def compiled? @compiled end |
#factory? ⇒ Boolean
70 71 72 |
# File 'lib/ree/core/object.rb', line 70 def factory? !!@factory end |
#fn? ⇒ Boolean
122 123 124 |
# File 'lib/ree/core/object.rb', line 122 def fn? @mount_as == :fn end |
#freeze? ⇒ Boolean
86 87 88 |
# File 'lib/ree/core/object.rb', line 86 def freeze? @freeze end |
#loaded? ⇒ Boolean
82 83 84 |
# File 'lib/ree/core/object.rb', line 82 def loaded? @loaded end |
#object? ⇒ Boolean
118 119 120 |
# File 'lib/ree/core/object.rb', line 118 def object? @mount_as == :object end |
#reset ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ree/core/object.rb', line 30 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 = [] end |
#set_after_init(val) ⇒ Object
152 153 154 |
# File 'lib/ree/core/object.rb', line 152 def set_after_init(val) @after_init = val; self end |
#set_as_compiled(frozen) ⇒ Object
52 53 54 55 |
# File 'lib/ree/core/object.rb', line 52 def set_as_compiled(frozen) @compiled = true @compiled_frozen = frozen end |
#set_as_not_compiled ⇒ Object
57 58 59 60 |
# File 'lib/ree/core/object.rb', line 57 def set_as_not_compiled @compiled = false @compiled_frozen = @freeze end |
#set_as_singleton ⇒ Object
109 110 111 |
# File 'lib/ree/core/object.rb', line 109 def set_as_singleton @singleton = true; self end |
#set_as_with_caller ⇒ Object
114 115 116 |
# File 'lib/ree/core/object.rb', line 114 def set_as_with_caller @with_caller = true; self end |
#set_class(klass) ⇒ Object
137 138 139 |
# File 'lib/ree/core/object.rb', line 137 def set_class(klass) @klass = klass; @class_name = klass.to_s; self end |
#set_factory(val) ⇒ Object
147 148 149 |
# File 'lib/ree/core/object.rb', line 147 def set_factory(val) @factory = val; self end |
#set_freeze(val) ⇒ Object
105 106 107 |
# File 'lib/ree/core/object.rb', line 105 def set_freeze(val) @freeze = val; self end |
#set_loaded ⇒ Object
78 79 80 |
# File 'lib/ree/core/object.rb', line 78 def set_loaded @loaded = true end |
#set_mount_as(val) ⇒ Object
100 101 102 |
# File 'lib/ree/core/object.rb', line 100 def set_mount_as(val) @mount_as = val; self end |
#set_package(val) ⇒ Object
142 143 144 |
# File 'lib/ree/core/object.rb', line 142 def set_package(val) @package_name = val; self end |
#set_rpath(val) ⇒ Object
127 128 129 |
# File 'lib/ree/core/object.rb', line 127 def set_rpath(val) @rpath = val; self end |
#set_schema_rpath(val) ⇒ Object
132 133 134 |
# File 'lib/ree/core/object.rb', line 132 def set_schema_rpath(val) @schema_rpath = val; self end |
#set_target(val) ⇒ Object
95 96 97 |
# File 'lib/ree/core/object.rb', line 95 def set_target(val) @target = val; self end |
#singleton? ⇒ Boolean
90 91 92 |
# File 'lib/ree/core/object.rb', line 90 def singleton? @singleton end |
#with_caller? ⇒ Boolean
62 63 64 |
# File 'lib/ree/core/object.rb', line 62 def with_caller? @with_caller end |