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 =
'6.1.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



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

def configuration
  @configuration
end

Class Method Details

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

Yields:



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

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

.send_to(peer_identifier, data) ⇒ Object



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

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