Class: ChatNotifier::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/chat_notifier/repository.rb,
lib/chat_notifier/repository/debug.rb,
lib/chat_notifier/repository/github.rb

Overview

All information about the location of the source code

Direct Known Subclasses

Debug, Github

Defined Under Namespace

Classes: Debug, Github

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings:) ⇒ Repository

Returns a new instance of Repository.



6
7
8
# File 'lib/chat_notifier/repository.rb', line 6

def initialize(settings:)
  @settings = settings
end

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings.



10
11
12
# File 'lib/chat_notifier/repository.rb', line 10

def settings
  @settings
end

Class Method Details

.for(settings) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/chat_notifier/repository.rb', line 12

def self.for(settings)
  if settings["DEBUG"]
    Debug
  else
    Github
  end.new(settings: settings)
end

Instance Method Details



20
21
# File 'lib/chat_notifier/repository.rb', line 20

def link(_sha)
end