Class: Mochizuki::Configurable::Configuration
- Inherits:
-
Object
- Object
- Mochizuki::Configurable::Configuration
- Defined in:
- lib/mochizuki/configurable.rb
Instance Attribute Summary collapse
-
#alarm_threshold ⇒ Object
Returns the value of attribute alarm_threshold.
-
#api_host ⇒ Object
Returns the value of attribute api_host.
-
#api_port ⇒ Object
Returns the value of attribute api_port.
-
#bot_token ⇒ Object
Returns the value of attribute bot_token.
-
#building ⇒ Object
Returns the value of attribute building.
-
#campus ⇒ Object
Returns the value of attribute campus.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#dorm ⇒ Object
Returns the value of attribute dorm.
-
#floor ⇒ Object
Returns the value of attribute floor.
-
#query_interval ⇒ Object
Returns the value of attribute query_interval.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/mochizuki/configurable.rb', line 29 def initialize @bot_token = nil @channel = nil @api_host = '202.120.163.129' # https://nyglzx.tongji.edu.cn @api_port = '88' @query_interval = '300s' @alarm_threshold = '60' # kWh # shitty names from legacy code @campus = nil # -> drlouming @building = nil # -> drceng @floor = nil # -> dr_ceng @dorm = nil # -> drfangjian end |
Instance Attribute Details
#alarm_threshold ⇒ Object
Returns the value of attribute alarm_threshold.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def alarm_threshold @alarm_threshold end |
#api_host ⇒ Object
Returns the value of attribute api_host.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def api_host @api_host end |
#api_port ⇒ Object
Returns the value of attribute api_port.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def api_port @api_port end |
#bot_token ⇒ Object
Returns the value of attribute bot_token.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def bot_token @bot_token end |
#building ⇒ Object
Returns the value of attribute building.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def building @building end |
#campus ⇒ Object
Returns the value of attribute campus.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def campus @campus end |
#channel ⇒ Object
Returns the value of attribute channel.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def channel @channel end |
#dorm ⇒ Object
Returns the value of attribute dorm.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def dorm @dorm end |
#floor ⇒ Object
Returns the value of attribute floor.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def floor @floor end |
#query_interval ⇒ Object
Returns the value of attribute query_interval.
24 25 26 |
# File 'lib/mochizuki/configurable.rb', line 24 def query_interval @query_interval end |