Browse files

Initial version - Object#member_of

  • Loading branch information...
0 parents commit ca585b05956c8861331d016482c31179ae0b06f6 @tehpeh committed May 20, 2011
Showing with 43 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +4 −0 Gemfile
  3. +2 −0 Rakefile
  4. +4 −0 lib/set_theory.rb
  5. +5 −0 lib/set_theory/member_of.rb
  6. +3 −0 lib/set_theory/version.rb
  7. +21 −0 set_theory.gemspec
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in set_theory.gemspec
+gemspec
2 Rakefile
@@ -0,0 +1,2 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
4 lib/set_theory.rb
@@ -0,0 +1,4 @@
+require "set_theory/member_of"
+
+module SetTheory
+end
5 lib/set_theory/member_of.rb
@@ -0,0 +1,5 @@
+class Object
+ def member_of?(ary)
+ ary.include? self
+ end
+end
3 lib/set_theory/version.rb
@@ -0,0 +1,3 @@
+module SetTheory
+ VERSION = "0.0.1"
+end
21 set_theory.gemspec
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "set_theory/version"
+
+Gem::Specification.new do |s|
+ s.name = "set_theory"
+ s.version = SetTheory::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Tim Preston"]
+ s.email = ["tim@tp.id.au"]
+ s.homepage = "http://github.com/tehpeh/set_theory"
+ s.summary = %q{Extends Object with nice names for set operations.}
+ s.description = %q{Extends Object with nice names for set operations.}
+
+ s.rubyforge_project = "set_theory"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end

0 comments on commit ca585b0

Please sign in to comment.