Module: SummaryJudgement
- Defined in:
- lib/summary_judgement.rb,
lib/summary_judgement/summary.rb,
lib/summary_judgement/descriptor.rb,
lib/summary_judgement/instance_methods.rb
Defined Under Namespace
Modules: InstanceMethods
Classes: Descriptor, Summary
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.extended(base) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'lib/summary_judgement.rb', line 5
def self.extended(base)
base.initialize_summary Summary.new(base)
base.send :include, InstanceMethods
def base.inherited(subclass)
subclass.initialize_summary @summary.dup(subclass)
super
end
end
|
Instance Method Details
#initialize_summary(summary) ⇒ Object
22
23
24
|
# File 'lib/summary_judgement.rb', line 22
def initialize_summary(summary)
@summary = summary
end
|
#summarize(&blk) ⇒ Object
14
15
16
|
# File 'lib/summary_judgement.rb', line 14
def summarize(&blk)
@summary.define(&blk)
end
|
18
19
20
|
# File 'lib/summary_judgement.rb', line 18
def summary
@summary
end
|