Module: Thrift::LocalTypeChecking

Defined in:
lib/thrift/local_type_checking.rb,
lib/thrift/local_type_checking/version.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.extendedObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/thrift/local_type_checking.rb', line 6

def self.extended(*)
  ::Thrift::Struct.extend(ClassMethods)
  ::Thrift::Struct.overwrite_initialize
  ::Thrift::Struct.instance_eval do
    def method_added(name)
      return if name != :initialize
      overwrite_initialize
    end
  end
end