Sha256: 7feb842d518625b6ef53b8ce41cdfd4bcf842b91a30b6ae46fc31fe813342626

Contents?: true

Size: 291 Bytes

Versions: 14

Compression:

Stored size: 291 Bytes

Contents

class User
  attr_reader :name

  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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
opal-sprockets-1.0.4 example/app/user.rb
opal-sprockets-1.0.3 example/app/user.rb
opal-sprockets-1.0.2 example/app/user.rb
opal-sprockets-1.0.1 example/app/user.rb
opal-sprockets-1.0.0 example/app/user.rb
opal-sprockets-0.4.9.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.8.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.7.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.6.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.5.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.4.1.0.3.7 example/app/user.rb
opal-sprockets-0.4.3.0.11.0.3.7 example/app/user.rb
opal-sprockets-0.4.2.0.11.0.3.1 example/app/user.rb
opal-sprockets-0.4.2.pre.1.0.11.0.3.1 example/app/user.rb