Module: RubyInterface::ClassMethods
- Defined in:
- lib/ruby_interface.rb
Instance Method Summary collapse
Instance Method Details
#defines(*args) ⇒ Object
19 20 21 22 |
# File 'lib/ruby_interface.rb', line 19 def defines(*args) @methods_to_define ||= [] @methods_to_define += args end |
#track_required_methods(child) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/ruby_interface.rb', line 24 def track_required_methods(child) missing_methods = @methods_to_define - child.instance_methods(false) return if missing_methods.empty? = "Expected #{child.name || 'anonymous class'} to define " << missing_methods.map { |method| "##{method}" }.join(', ') raise NotImplementedError, end |