Module: Superiseable

Included in:
Java::OrgTmapiCore::Association, Java::OrgTmapiCore::Construct, Java::OrgTmapiCore::DatatypeAware, Java::OrgTmapiCore::Locator, Java::OrgTmapiCore::Name, Java::OrgTmapiCore::Occurrence, Java::OrgTmapiCore::Reifiable, Java::OrgTmapiCore::Role, Java::OrgTmapiCore::Scoped, Java::OrgTmapiCore::Topic, Java::OrgTmapiCore::TopicMap, Java::OrgTmapiCore::Typed, Java::OrgTmapiCore::Variant, RTM::JavaTMAPI
Defined in:
rtm-javatmapi/lib/rtm/javatmapi/superiseable.rb

Overview

Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. License: Apache License, Version 2.0

Instance Method Summary

Instance Method Details

- (Object) method_added(method_name)



10
11
12
13
14
15
# File 'rtm-javatmapi/lib/rtm/javatmapi/superiseable.rb', line 10

def method_added(method_name)
  if @superised
    superising method_name
  end
  @superised = false
end

- (Object) register_java_implementation(klass)



22
23
24
25
26
27
28
# File 'rtm-javatmapi/lib/rtm/javatmapi/superiseable.rb', line 22

def register_java_implementation(klass)
  self.included(klass) if self.respond_to?(:included)
  return unless @superized_methods
  @superized_methods.each do |method_name|
    klass.class_eval("def #{method_name}(*args); super; end")
  end
end

- (Object) superised



6
7
8
# File 'rtm-javatmapi/lib/rtm/javatmapi/superiseable.rb', line 6

def superised
  @superised = true
end

- (Object) superising(method_name)



17
18
19
20
# File 'rtm-javatmapi/lib/rtm/javatmapi/superiseable.rb', line 17

def superising method_name
  @superized_methods ||= []
  @superized_methods << method_name
end