diff --git a/vendor/abstract/ChangeLog b/vendor/abstract/ChangeLog new file mode 100644 index 0000000..1e8a805 --- /dev/null +++ b/vendor/abstract/ChangeLog @@ -0,0 +1,3 @@ +: release 1.0.0 (2006-03-12) + - first release (1.0.0) + diff --git a/vendor/abstract/README.txt b/vendor/abstract/README.txt new file mode 100644 index 0000000..444dd7d --- /dev/null +++ b/vendor/abstract/README.txt @@ -0,0 +1,57 @@ += README + +revision:: $Rev: 1 $ +release:: $Release: 1.0.0 $ +copyright:: copyright(c) 2006 kuwata-lab.com all rights reserved. + + +== Introduction + +'abstract.rb' is a library which enable you to define abstract method in Ruby. + +The followings are examples: + + ## example1. (shorter notation) + require 'rubygems' # if installed with 'gem install' + require 'abstract' + class Foo + abstract_method 'arg1, arg2=""', :method1, :method2, :method3 + end + + ## example2. (RDoc friendly notation) + require 'rubygems' # if installed with 'gem install' + require 'abstract' + class Bar + # ... method1 description ... + def method1(arg1, arg2="") + not_implemented + end + # ... method2 description ... + def method2(arg1, arg2="") + not_implemented + end + end + + +Abstract method makes your code more descriptive. +It is useful even for dynamic language such as Ruby. + + +== Installation + + +* Type 'gem install -r abstract' with root account if you have installed RubyGems. + +* Or type 'ruby setup.rb' with root account if you can be root account. + +* Or copy lib/abstract.rb into proper directory such as '/usr/local/lib/ruby/site_ruby'. + + +== License + +Ruby's + + +== Copyright + +copyright(c) 2006 kuwata-lab.com all rights reserved. diff --git a/vendor/abstract/abstract.gemspec b/vendor/abstract/abstract.gemspec new file mode 100644 index 0000000..5f7a406 --- /dev/null +++ b/vendor/abstract/abstract.gemspec @@ -0,0 +1,48 @@ +#!/usr/bin/env ruby + +### +### RubyGems Specification file for abstract.rb +### +### $Rev: 1 $ +### $Release: 1.0.0 $ +### copyright(c) 2006 kuwata-lab.com all rights reserved. +### + +require 'rubygems' + +spec = Gem::Specification.new do |s| + ## package information + s.name = 'abstract' + s.author = 'makoto kuwata' + s.version = ("$Release: 1.0.0 $" =~ /[\.\d]+/) && $& + s.platform = Gem::Platform::RUBY + s.homepage = 'http://rubyforge.org/projects/abstract' + s.summary = "a library which enable you to define abstract method in Ruby" + s.description = <<-'END' + 'abstract.rb' is a library which enable you to define abstract method in Ruby. + END + + ## files + files = [] + files += Dir.glob('lib/**/*') + files += Dir.glob('test/**/*') + files += %w[README.txt ChangeLog setup.rb abstract.gemspec] + #s.files = files.delete_if { |path| path =~ /\.svn/ } + s.files = files + s.test_file = 'test/test.rb' +end + +# Quick fix for Ruby 1.8.3 / YAML bug (thanks to Ross Bamford) +if (RUBY_VERSION == '1.8.3') + def spec.to_yaml + out = super + out = '--- ' + out unless out =~ /^---/ + out + end +end + +if $0 == __FILE__ + Gem::manage_gems + Gem::Builder.new(spec).build +end + diff --git a/vendor/abstract/doc/classes/Kernel.html b/vendor/abstract/doc/classes/Kernel.html new file mode 100644 index 0000000..6655279 --- /dev/null +++ b/vendor/abstract/doc/classes/Kernel.html @@ -0,0 +1,134 @@ + + + + +
+Module | +Kernel | +
In: | +
+
+ lib/abstract.rb
+
+ + |
+
# File lib/abstract.rb, line 65 + def not_implemented #:doc: + backtrace = caller() + method_name = (backtrace.shift =~ /`(\w+)'$/) && $1 + mesg = "class #{self.class.name} must implement abstract method '#{method_name}()'." + #mesg = "#{self.class.name}##{method_name}() is not implemented." + err = NotImplementedError.new mesg + err.set_backtrace backtrace + raise err + end+ + \ No newline at end of file diff --git a/vendor/abstract/doc/classes/Module.html b/vendor/abstract/doc/classes/Module.html new file mode 100644 index 0000000..7adc654 --- /dev/null +++ b/vendor/abstract/doc/classes/Module.html @@ -0,0 +1,140 @@ + + + + + +
Class | +Module | +
In: | +
+
+ lib/abstract.rb
+
+ + |
+
Parent: | ++ Object + | +
# File lib/abstract.rb, line 41 + def abstract_method args_str, *method_names + method_names.each do |name| + module_eval "def \#{name}(\#{args_str})\nmesg = \"class \\\#{self.class.name} must implement abstract method `\#{self.name}#\#{name}()'.\"\n#mesg = \"\\\#{self.class.name}#\#{name}() is not implemented.\"\nerr = NotImplementedError.new mesg\nerr.set_backtrace caller()\nraise err\nend\n" + end + end+ + \ No newline at end of file diff --git a/vendor/abstract/doc/created.rid b/vendor/abstract/doc/created.rid new file mode 100644 index 0000000..fb0895a --- /dev/null +++ b/vendor/abstract/doc/created.rid @@ -0,0 +1 @@ +Mon Mar 13 06:08:02 JST 2006 diff --git a/vendor/abstract/doc/files/README_txt.html b/vendor/abstract/doc/files/README_txt.html new file mode 100644 index 0000000..7628065 --- /dev/null +++ b/vendor/abstract/doc/files/README_txt.html @@ -0,0 +1,173 @@ + + + + + +
Path: | +README.txt + | +
Last Update: | +Mon Mar 13 06:08:02 JST 2006 | +
revision: | $Rev: 1 $ + + |
release: | $Release: 1.0.0 $ + + |
copyright: | copyright© 2006 kuwata-lab.com all rights reserved. + + |
+‘abstract.rb’ is a library which enable you to define abstract +method in Ruby. +
++The followings are examples: +
++ ## example1. (shorter notation) + require 'rubygems' # if installed with 'gem install' + require 'abstract' + class Foo + abstract_method 'arg1, arg2=""', :method1, :method2, :method3 + end + + ## example2. (RDoc friendly notation) + require 'rubygems' # if installed with 'gem install' + require 'abstract' + class Bar + # ... method1 description ... + def method1(arg1, arg2="") + not_implemented + end + # ... method2 description ... + def method2(arg1, arg2="") + not_implemented + end + end ++
+Abstract method makes your code more descriptive. It is useful even for +dynamic language such as Ruby. +
++Ruby’s +
++copyright© 2006 kuwata-lab.com all rights reserved. +
+ +Path: | +lib/abstract.rb + | +
Last Update: | +Mon Mar 13 06:08:02 JST 2006 | +
+$Rev: 1 $ $Release: 1.0.0 $ copyright© 2006 kuwata-lab.com all rights +reserved. +
++helper to define abstract method in Ruby. +
++example1. (shorter notation) +
++ require 'abstract' + class Foo + abstract_method 'arg1, arg2=""', :method1, :method2, :method3 + end ++
+example2. (RDoc friendly notation) +
++ require 'abstract' + class Bar + # ... method1 description ... + def method1(arg1, arg2="") + not_implemented + end + + # ... method2 description ... + def method2(arg1, arg2="") + not_implemented + end + end ++ +