rubyx/test/test/fake_builder.rb
2014-04-24 15:43:20 +03:00

22 lines
345 B
Ruby

class FakeBuilder
attr_reader :result
def initialize
@result = ''
end
def class_builder
'example'
end
def int
'int'
end
def method_missing(name, *args, &block)
@result += ([name] + args.flatten).join(', ').sub(',', '')
@result += "\n"
block.call(self) if name.to_s == 'public_static_method'
end
end