Skip to content

Commit

Permalink
Cleanup sprockets example app
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Nov 25, 2013
1 parent 5d06f5b commit b5dc52a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
8 changes: 3 additions & 5 deletions example/app/application.rb
@@ -1,13 +1,11 @@
require 'opal'
require 'foo'

puts "wow!"
require 'user'

module MyApp
class Application
def initialize
@user = Adam.new
@user.bar
@user = User.new('Bill')
@user.authenticated?
end
end
end
Expand Down
19 changes: 0 additions & 19 deletions example/app/foo.rb

This file was deleted.

21 changes: 21 additions & 0 deletions example/app/user.rb
@@ -0,0 +1,21 @@
class User
def initialize(name)
@name = name
end

def authenticated?
if admin? or special_persmission?
true
else
raise "not authenticated"
end
end

def admin?
@name == 'Bob'
end

def special_persmission?
false
end
end

0 comments on commit b5dc52a

Please sign in to comment.