class Pili::StreamInfo
Attributes
converts[R]
流转码配置数组
disabled_till[R]
表示禁用结束的时间, 0 表示不禁用, -1 表示永久禁用.
hub[R]
title[R]
Public Class Methods
new(hub, title, disabled_till, converts)
click to toggle source
# File lib/pili/stream.rb, line 15 def initialize(hub, title, disabled_till, converts) @hub = hub @title = title @disabled_till = disabled_till @converts = converts end
Public Instance Methods
disabled?()
click to toggle source
# File lib/pili/stream.rb, line 22 def disabled? @disabled_till == -1 || @disabled_till > Time.new.to_i end
to_json()
click to toggle source
# File lib/pili/stream.rb, line 30 def to_json {:hub=>@hub, :key=>@title, :disabled=>disabled?, :converts=>@converts}.to_json end
to_s()
click to toggle source
# File lib/pili/stream.rb, line 26 def to_s "#<#{self.class} #{@hub}/#{@title} disabled:#{disabled?} converts:#{@converts}>" end