Module: Interapp

Defined in:
lib/interapp.rb,
lib/interapp/engine.rb,
lib/interapp/errors.rb,
lib/interapp/version.rb,
app/models/interapp/peer.rb,
lib/interapp/cryptography.rb,
lib/interapp/configuration.rb,
app/models/interapp/message.rb,
app/services/interapp/send_message_service.rb,
app/controllers/interapp/messages_controller.rb,
app/services/interapp/receive_message_service.rb,
app/controllers/interapp/application_controller.rb

Defined Under Namespace

Modules: Cryptography Classes: ApplicationController, Configuration, Engine, Message, MessagesController, Peer, ReceiveMessageService, SendMessageService, SignatureInvalidError, UnknownPeerError

Constant Summary collapse

EC_GROUP =
ECDSA::Group::Secp256k1
VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



12
13
14
# File 'lib/interapp.rb', line 12

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



15
16
17
18
# File 'lib/interapp.rb', line 15

def self.configure
  self.configuration ||= Interapp::Configuration.new
  yield(configuration)
end

.send_to(peer_identifier, data) ⇒ Object



20
21
22
# File 'lib/interapp.rb', line 20

def self.send_to(peer_identifier, data)
  Interapp::SendMessageService.new(data: data, peer_identifier: peer_identifier).perform
end