This repository has been archived by the owner on Oct 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some explanations and manual test fixtures
- Loading branch information
Showing
6 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Class definition | ||
|
||
A class definition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Class inheritance | ||
|
||
Some inheritance right here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a = 1 | ||
b = a + 2 |