Class: Naminori::Notifier::Configure

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/naminori/notifier/configure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



7
8
9
# File 'lib/naminori/notifier/configure.rb', line 7

def channel
  @channel
end

#userObject (readonly)

Returns the value of attribute user.



7
8
9
# File 'lib/naminori/notifier/configure.rb', line 7

def user
  @user
end

#webhook_urlObject (readonly)

Returns the value of attribute webhook_url.



7
8
9
# File 'lib/naminori/notifier/configure.rb', line 7

def webhook_url
  @webhook_url
end

Instance Method Details

#enable?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/naminori/notifier/configure.rb', line 15

def enable?
  webhook_url && channel && user
end

#set(options) ⇒ Object



9
10
11
12
13
# File 'lib/naminori/notifier/configure.rb', line 9

def set(options)
  @webhook_url = options[:webhook_url]
  @channel     = options[:channel]
  @user        = options[:user]
end