Class: Rea::WorkKey
- Inherits:
-
Object
- Object
- Rea::WorkKey
- Defined in:
- lib/rea/work_key.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(provider, identifier) ⇒ WorkKey
constructor
A new instance of WorkKey.
- #to_ruby_literal ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(provider, identifier) ⇒ WorkKey
Returns a new instance of WorkKey.
7 8 9 |
# File 'lib/rea/work_key.rb', line 7 def initialize(provider, identifier) @provider, @identifier = provider, identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
5 6 7 |
# File 'lib/rea/work_key.rb', line 5 def identifier @identifier end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
4 5 6 |
# File 'lib/rea/work_key.rb', line 4 def provider @provider end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
19 20 21 |
# File 'lib/rea/work_key.rb', line 19 def ==(other) other.is_a?(WorkKey) and other.to_s == to_s end |
#to_ruby_literal ⇒ Object
28 29 30 |
# File 'lib/rea/work_key.rb', line 28 def to_ruby_literal "Rea::WorkKey(#{to_s.inspect})" end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/rea/work_key.rb', line 24 def to_s "#{provider}://#{identifier}" end |