Class: StoryTeller::InvocationIdentity
- Includes:
- PrivilegedIdentity
- Defined in:
- lib/story_teller/privileges.rb
Overview
class InvocationIdentity
Instance Attribute Summary collapse
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
Instance Method Summary collapse
- #identity ⇒ Object
-
#initialize(runtime) ⇒ InvocationIdentity
constructor
A new instance of InvocationIdentity.
- #name ⇒ Object
- #privilege_label ⇒ Object
- #privileged?(privilege) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(runtime) ⇒ InvocationIdentity
Returns a new instance of InvocationIdentity.
30 31 32 |
# File 'lib/story_teller/privileges.rb', line 30 def initialize(runtime) @runtime = runtime end |
Instance Attribute Details
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
28 29 30 |
# File 'lib/story_teller/privileges.rb', line 28 def runtime @runtime end |
Instance Method Details
#identity ⇒ Object
34 35 36 |
# File 'lib/story_teller/privileges.rb', line 34 def identity "runtime:#{runtime.identity}" end |
#name ⇒ Object
42 43 44 |
# File 'lib/story_teller/privileges.rb', line 42 def name privilege_label end |
#privilege_label ⇒ Object
38 39 40 |
# File 'lib/story_teller/privileges.rb', line 38 def privilege_label 'this runtime session' end |
#privileged?(privilege) ⇒ Boolean
46 47 48 |
# File 'lib/story_teller/privileges.rb', line 46 def privileged?(privilege) runtime.privileged?(privilege) end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/story_teller/privileges.rb', line 50 def to_s privilege_label end |