Class: IDL::Backend::Configurator
- Inherits:
-
Object
- Object
- IDL::Backend::Configurator
- Defined in:
- lib/ridl/backend.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
readonly
Returns the value of attribute backend.
Instance Method Summary collapse
- #add_backend(be_name) ⇒ Object
-
#initialize(be_name, root, title, copyright, version) ⇒ Configurator
constructor
A new instance of Configurator.
- #on_process_input(&block) ⇒ Object
- #on_setup(&block) ⇒ Object
Constructor Details
#initialize(be_name, root, title, copyright, version) ⇒ Configurator
Returns a new instance of Configurator.
24 25 26 27 |
# File 'lib/ridl/backend.rb', line 24 def initialize(be_name, root, title, copyright, version) @backend = IDL::Backend.new(be_name, root, title, copyright, version) @be_ext_klass = class << @backend; self; end end |
Instance Attribute Details
#backend ⇒ Object (readonly)
Returns the value of attribute backend.
23 24 25 |
# File 'lib/ridl/backend.rb', line 23 def backend @backend end |
Instance Method Details
#add_backend(be_name) ⇒ Object
29 30 31 |
# File 'lib/ridl/backend.rb', line 29 def add_backend(be_name) @backend.instance_variable_get('@base_backends') << IDL::Backend.load(be_name) end |
#on_process_input(&block) ⇒ Object
38 39 40 41 |
# File 'lib/ridl/backend.rb', line 38 def on_process_input(&block) @be_ext_klass.send(:define_method, :_process_input, &block) @be_ext_klass.send(:private, :_process_input) end |
#on_setup(&block) ⇒ Object
33 34 35 36 |
# File 'lib/ridl/backend.rb', line 33 def on_setup(&block) @be_ext_klass.send(:define_method, :_setup_be, &block) @be_ext_klass.send(:private, :_setup_be) end |