Class: StatusCat::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/status_cat/config.rb

Constant Summary collapse

NIL_PROC =
proc {}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



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

def initialize
  descendants = StatusCat::Checkers::Base.descendants
  @enabled = descendants.map { |klass| StatusCat::Checkers::Base.class_to_name(klass) }.sort
end

Instance Attribute Details

#authenticateObject

Returns the value of attribute authenticate.



10
11
12
# File 'lib/status_cat/config.rb', line 10

def authenticate
  @authenticate
end

#authorizeObject

Returns the value of attribute authorize.



10
11
12
# File 'lib/status_cat/config.rb', line 10

def authorize
  @authorize
end

#enabledObject

Returns the value of attribute enabled.



9
10
11
# File 'lib/status_cat/config.rb', line 9

def enabled
  @enabled
end

#fromObject

Returns the value of attribute from.



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

def from
  @from
end

#layoutObject

Returns the value of attribute layout.



12
13
14
# File 'lib/status_cat/config.rb', line 12

def layout
  @layout
end

#noreplyObject

Returns the value of attribute noreply.



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

def noreply
  @noreply
end

#subjectObject

Returns the value of attribute subject.



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

def subject
  @subject
end

#toObject

Returns the value of attribute to.



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

def to
  @to
end

Instance Method Details

#authenticate_with(&blk) ⇒ Object



19
20
21
22
# File 'lib/status_cat/config.rb', line 19

def authenticate_with(&blk)
  @authenticate = blk if blk
  @authenticate || NIL_PROC
end

#authorize_with(&block) ⇒ Object



24
25
26
27
# File 'lib/status_cat/config.rb', line 24

def authorize_with(&block)
  @authorize = block if block
  @authorize || NIL_PROC
end