Skip to content

Commit

Permalink
rename Singleton to SupSingleton to sidestep conflicts with ruby's Si…
Browse files Browse the repository at this point in the history
…ngleton
  • Loading branch information
eMBee committed Mar 22, 2014
1 parent b989218 commit 5e36249
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/sup/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def bounce_sendmail
end

class AccountManager
include Singleton
include SupSingleton

attr_accessor :default_account

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def blur
end

class BufferManager
include Singleton
include SupSingleton

attr_reader :focus_buf

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Redwood

class ContactManager
include Singleton
include SupSingleton

def initialize fn
@fn = fn
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/crypto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Redwood

class CryptoManager
include Singleton
include SupSingleton

class Error < StandardError; end

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/draft.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Redwood

class DraftManager
include Singleton
include SupSingleton

attr_accessor :source
def initialize dir
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __run __hook, __filename, __locals
end
end

include Singleton
include SupSingleton

@descs = {}

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/idle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Redwood

class IdleManager
include Singleton
include SupSingleton

IDLE_THRESHOLD = 60

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def initialize h
def method_missing m; @h[m.to_s] end
end

include Singleton
include SupSingleton

def initialize dir=BASE_DIR
@dir = dir
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/label.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Redwood

class LabelManager
include Singleton
include SupSingleton

## labels that have special semantics. user will be unable to
## add/remove these via normal label mechanisms.
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Redwood
## also keeps a record of all messages, so that adding a new sink will send all
## previous messages to it by default.
class Logger
include Singleton
include SupSingleton

LEVELS = %w(debug info warn error) # in order!

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/poll.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Redwood

class PollManager
include Singleton
include SupSingleton

HookManager.register "before-add-message", <<EOS
Executes immediately before a message is added to the index.
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Redwood

class SearchManager
include Singleton
include SupSingleton

class ExpansionError < StandardError; end

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/sent.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Redwood

class SentManager
include Singleton
include SupSingleton

attr_reader :source, :source_uri

Expand Down
2 changes: 1 addition & 1 deletion lib/sup/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def after_unmarshal!
end

class SourceManager
include Singleton
include SupSingleton

def initialize
@sources = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/undo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Redwood
## undo the archival action

class UndoManager
include Singleton
include SupSingleton

def initialize
@@actionlist = []
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Redwood
## single "view". Luckily, that's true.)

class UpdateManager
include Singleton
include SupSingleton

def initialize
@targets = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def nonempty?; !empty? end
## classes that inherit this can define initialize. however, you cannot call
## .new on the class. To get the instance of the class, call .instance;
## to create the instance, call init.
module Singleton
module SupSingleton
module ClassMethods
def instance; @instance; end
def instantiated?; defined?(@instance) && !@instance.nil?; end
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/util/ncurses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def dumb? ; self.class.dumb? end ## True if
# Empty singleton that
# keeps GC from going crazy.
class Empty < CharCode
include Singleton
include SupSingleton

## Wrap methods that may change us
## and generate new object instead.
Expand Down

0 comments on commit 5e36249

Please sign in to comment.