Class: StoreAgent::Superuser

Inherits:
User
  • Object
show all
Defined in:
lib/store_agent/user.rb

Overview

スーパーユーザーは全オブジェクトに対して全権限を持つ

super_user = StoreAgent::Superuser.new
super_user.workspace("ws").file("file.txt").create

Instance Attribute Summary

Attributes inherited from User

#identifiers

Instance Method Summary collapse

Methods inherited from User

#guest?, #identifier, #identifier_array, #workspace

Methods included from Validator

#validates_to_be_excluded_slash!, #validates_to_be_not_guest_identifier!, #validates_to_be_not_nil_value!, #validates_to_be_not_superuser_identifier!, #validates_to_be_string_or_symbol!

Constructor Details

#initializeSuperuser

Returns a new instance of Superuser.



90
91
92
# File 'lib/store_agent/user.rb', line 90

def initialize(*)
  @identifiers = [StoreAgent.config.superuser_identifier]
end

Instance Method Details

#super_user?Boolean

:nodoc:

Returns:

  • (Boolean)


94
95
96
# File 'lib/store_agent/user.rb', line 94

def super_user? # :nodoc:
  true
end