Module: L43::OpenObject
- Defined in:
- lib/l43/open_object.rb,
lib/l43/open_object/behavior.rb,
lib/l43/open_object/initializer.rb
Defined Under Namespace
Modules: Behavior, Initializer
Constant Summary
collapse
- VERSION =
"0.2.5"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.def_class(*a, **k, &b) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/l43/open_object.rb', line 34
def self.def_class(*a, **k, &b)
oo = self
Class.new do
extend oo
attributes(*a, **k, &b)
end
end
|
Instance Method Details
#attributes(*atts, **defaults, &blk) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/l43/open_object.rb', line 9
def attributes(*atts, **defaults, &blk)
attr_reader(*atts)
attr_reader(*defaults.keys)
Initializer.define_initialize(self, atts, defaults, blk)
include Behavior
end
|