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
# 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?

  raise_class_definition_error child, missing_methods
end