Module: BlackStack::QABot::Flag

Included in:
BoolFlag, FloatFlag, IntFlag
Defined in:
lib/qabot.rb

Overview

this module contains methods that are commons to any kind flags

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.push(h) ⇒ Object

submit a flag descriptor to the server, via REST-API.



242
243
244
245
246
# File 'lib/qabot.rb', line 242

def self.push(h)
    url = "#{BlackStack::Pampa::api_url}/api.1.1.0/qabot/push.json"
    api_key = BlackStack::Pampa::api_key
    BlackStack::Netting::api_call( url, {:api_key => api_key}.merge(h) )
end

Instance Method Details

#alertObject

send an email notification to all the receivers of this flag.



237
238
239
# File 'lib/qabot.rb', line 237

def alert()
    # TODO: Code Me!
end

#should_alert?Boolean

return true of the latest trace is ‘stat_red==true`, and the previous trace is `stat_red==false`.

Returns:

  • (Boolean)


231
232
233
234
# File 'lib/qabot.rb', line 231

def should_alert?
    # TODO: Code Me!
    false
end