module Sockit
Author: Zachary Patten <zpatten AT jovelabs DOT io>
Copyright: Copyright © Zachary Patten
License: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constants
- COLORS
- DEFAULT_CONFIG
- VERSION
Public Class Methods
config() { |config| ... }
click to toggle source
# File lib/sockit.rb, line 54 def self.config(&block) @@config ||= OpenStruct.new(Sockit::DEFAULT_CONFIG) if block_given? yield(@@config) else @@config end end
disable()
click to toggle source
# File lib/sockit.rb, line 80 def self.disable @@enabled = false end
enable()
click to toggle source
# File lib/sockit.rb, line 76 def self.enable @@enabled = true end
enabled?()
click to toggle source
# File lib/sockit.rb, line 72 def self.enabled? @@enabled ||= false end
Public Instance Methods
config() { |config| ... }
click to toggle source
# File lib/sockit.rb, line 63 def config(&block) @@config ||= OpenStruct.new(Sockit::DEFAULT_CONFIG) if block_given? yield(@@config) else @@config end end