Module: Enterprisifier::Marshalling::SchemaComposition::InstanceMethods
- Defined in:
- lib/enterprisifier/marshalling/schema_composition.rb
Overview
InstanceMethods
Instance Method Summary collapse
- #definition_changed(change_name, def_i) ⇒ Object
- #evaluate(block) ⇒ Object
- #initialize(*args) {|_self| ... } ⇒ Object
- #namespace ⇒ Object
- #reify(reifiable) ⇒ Object
Instance Method Details
#definition_changed(change_name, def_i) ⇒ Object
71 72 73 74 |
# File 'lib/enterprisifier/marshalling/schema_composition.rb', line 71 def definition_changed(change_name, def_i) return nil unless respond_to?(:reified, true) def_i.reify(reified) end |
#evaluate(block) ⇒ Object
61 62 63 |
# File 'lib/enterprisifier/marshalling/schema_composition.rb', line 61 def evaluate(block) instance_eval(&block) if block end |
#initialize(*args) {|_self| ... } ⇒ Object
49 50 51 |
# File 'lib/enterprisifier/marshalling/schema_composition.rb', line 49 def initialize(*args) yield(self) if block_given? end |
#namespace ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/enterprisifier/marshalling/schema_composition.rb', line 53 def namespace if @parent @parent.namespace else self.class.namespace end end |
#reify(reifiable) ⇒ Object
65 66 67 68 69 |
# File 'lib/enterprisifier/marshalling/schema_composition.rb', line 65 def reify(reifiable) composition.each do |comp| Array(instance_variable_get("@#{comp.to_s.underscore.pluralize}")).each {|c| c.reify(reifiable) } end end |