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



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

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

Instance Attribute Details

#authenticateObject

Returns the value of attribute authenticate.



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

def authenticate
  @authenticate
end

#authorizeObject

Returns the value of attribute authorize.



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

def authorize
  @authorize
end

#enabledObject

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#fromObject

Returns the value of attribute from.



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

def from
  @from
end

#layoutObject

Returns the value of attribute layout.



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

def layout
  @layout
end

#noreplyObject

Returns the value of attribute noreply.



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

def noreply
  @noreply
end

#subjectObject

Returns the value of attribute subject.



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

def subject
  @subject
end

#toObject

Returns the value of attribute to.



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

def to
  @to
end

Instance Method Details

#authenticate_with(&blk) ⇒ Object



21
22
23
24
# File 'lib/status_cat/config.rb', line 21

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

#authorize_with(&block) ⇒ Object



26
27
28
29
# File 'lib/status_cat/config.rb', line 26

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