Class: Shuttlecraft::Protocol

Inherits:
Object
  • Object
show all
Defined in:
lib/shuttlecraft/protocol.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_name = :Mothership, name = 'Mothership') ⇒ Protocol

Returns a new instance of Protocol.



5
6
7
8
# File 'lib/shuttlecraft/protocol.rb', line 5

def initialize(service_name=:Mothership, name='Mothership')
  @service_name = service_name
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/shuttlecraft/protocol.rb', line 3

def name
  @name
end

#service_nameObject (readonly)

Returns the value of attribute service_name.



3
4
5
# File 'lib/shuttlecraft/protocol.rb', line 3

def service_name
  @service_name
end

Class Method Details

.defaultObject



10
11
12
13
# File 'lib/shuttlecraft/protocol.rb', line 10

def self.default
  @@default ||= Shuttlecraft::Protocol.new
  @@default
end