Class: Psapi::Settings::ChannelCleaner

Inherits:
API_Object
  • Object
show all
Defined in:
lib/psapi/settings.rb

Overview

チャンネルの自動切断

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from API_Object

accessors_for, define_all_with, inherited, #mass_assign

Methods included from Internal

camel_to_snake

Methods included from PeercastStation

initialize, #method_missing

Constructor Details

#initialize(hash) ⇒ ChannelCleaner

Returns a new instance of ChannelCleaner.



5
6
7
# File 'lib/psapi/settings.rb', line 5

def initialize(hash)
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Psapi::PeercastStation

Instance Attribute Details

#inactive_limitObject

Returns the value of attribute inactive_limit.



9
10
11
# File 'lib/psapi/settings.rb', line 9

def inactive_limit
  @inactive_limit
end

#modeObject

Returns the value of attribute mode.



9
10
11
# File 'lib/psapi/settings.rb', line 9

def mode
  @mode
end

Instance Method Details

#mode_stringObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/psapi/settings.rb', line 11

def mode_string
  case mode
  when 0
    '(自動切断しない)'
  when 1
    '接続していない'
  when 2
    '視聴・リレーしていない'
  when 3
    '視聴していない'
  end

end