Class: Interapp::Peer
- Inherits:
-
Object
- Object
- Interapp::Peer
- Defined in:
- app/models/interapp/peer.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Peer
constructor
A new instance of Peer.
- #public_key_decoded ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Peer
Returns a new instance of Peer.
5 6 7 |
# File 'app/models/interapp/peer.rb', line 5 def initialize(attributes = {}) attributes.each { |name, value| send("#{name}=", value) } end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
3 4 5 |
# File 'app/models/interapp/peer.rb', line 3 def endpoint @endpoint end |
#identifier ⇒ Object
Returns the value of attribute identifier.
3 4 5 |
# File 'app/models/interapp/peer.rb', line 3 def identifier @identifier end |
#public_key ⇒ Object
Returns the value of attribute public_key.
3 4 5 |
# File 'app/models/interapp/peer.rb', line 3 def public_key @public_key end |
Class Method Details
.all ⇒ Object
15 16 17 |
# File 'app/models/interapp/peer.rb', line 15 def self.all Interapp.configuration.peers end |
.find(identifier) ⇒ Object
19 20 21 |
# File 'app/models/interapp/peer.rb', line 19 def self.find(identifier) self.all.find{ |peer| peer.identifier == identifier } end |