Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Commit

Permalink
add some explanations and manual test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Aug 21, 2010
1 parent 133deb6 commit cf12fb8
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
multitask :default => :spec # [:server, :livereload]

task :server do
exec 'bundle', 'exec', 'shotgun'
end

task :livereload do
exec 'livereload'
end

task :spec do
exec *%w[bundle exec ruby code.rb --color]
end
3 changes: 3 additions & 0 deletions explanations/class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Class definition

A class definition.
3 changes: 3 additions & 0 deletions explanations/class_inheritance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Class inheritance

Some inheritance right here.
57 changes: 57 additions & 0 deletions fixtures/all.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env ruby
require 'date'

module Kittens
end

class Klass < MegaKlass
CONSTANT = "value"

include Kittens

def self.create(options)
new(options)
end

class << self
attr_accessor :default_options
end

attr_accessor :options

def initialize(moo = nil, options = {})
super
@options = options
end

def name=(value)
@name = value
end

def forced?
options[:force]
end

def destroy!
# zomg
end

def take_block(&block)
block.call(options)
end

def explicit_return
return true
end

__LINE__

__FILE__

$:
$LOAD_PATH
end

__END__

Extra data
9 changes: 9 additions & 0 deletions fixtures/comment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# foo
bar(baz)

# class comment
class Moo
def initialize
# hello
end
end
2 changes: 2 additions & 0 deletions fixtures/min.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a = 1
b = a + 2

0 comments on commit cf12fb8

Please sign in to comment.