Class: IdPlease::AssignmentLink
- Inherits:
-
Object
- Object
- IdPlease::AssignmentLink
- Defined in:
- lib/id_please/assignment_map.rb
Instance Attribute Summary collapse
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#via ⇒ Object
readonly
Returns the value of attribute via.
Instance Method Summary collapse
-
#initialize(*args) ⇒ AssignmentLink
constructor
A new instance of AssignmentLink.
Constructor Details
#initialize(*args) ⇒ AssignmentLink
Returns a new instance of AssignmentLink.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/id_please/assignment_map.rb', line 5 def initialize(*args) = args. if (assignment = [:assignment]) @subject = assignment.subject @target = assignment.role. @role = assignment.role.name else @subject = .delete(:subject) || raise("subject must be specified") @target = .delete(:target) || raise("target must be specified") @role = .delete(:role) || raise("role must be specified") end @role = @role.to_sym @via = .delete(:via) end |
Instance Attribute Details
#role ⇒ Object (readonly)
Returns the value of attribute role.
3 4 5 |
# File 'lib/id_please/assignment_map.rb', line 3 def role @role end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
3 4 5 |
# File 'lib/id_please/assignment_map.rb', line 3 def subject @subject end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
3 4 5 |
# File 'lib/id_please/assignment_map.rb', line 3 def target @target end |
#via ⇒ Object (readonly)
Returns the value of attribute via.
3 4 5 |
# File 'lib/id_please/assignment_map.rb', line 3 def via @via end |