class Ayadn::SetColor

Public Class Methods

new() click to toggle source
Calls superclass method Ayadn::SetBase::new
# File lib/ayadn/set.rb, line 642
def initialize
  super
  @category = 'colors'
end

Public Instance Methods

method_missing(meth, options) click to toggle source
Calls superclass method
# File lib/ayadn/set.rb, line 651
def method_missing(meth, options)
  @input = meth.to_s.capitalize
  @output = validate(options)
  case meth.to_s
  when 'id'
    Settings.options.colors.id = @output
  when 'index'
    Settings.options.colors.index = @output
  when 'username'
    Settings.options.colors.username = @output
  when 'name'
    Settings.options.colors.name = @output
  when 'date'
    Settings.options.colors.date = @output
  when 'link'
    Settings.options.colors.link = @output
  when 'dots'
    Settings.options.colors.dots = @output
  when 'mentions', 'mention'
    Settings.options.colors.mentions = @output
  when 'symbols', 'symbol'
    Settings.options.colors.symbols = @output
  when 'unread'
    Settings.options.colors.unread = @output
  when 'debug'
    Settings.options.colors.debug = @output
  when 'excerpt'
    Settings.options.colors.excerpt = @output
  when 'hashtag', 'tag', 'hashtags'
    Settings.options.colors.hashtag = @output
  when 'client', 'source'
    Settings.options.colors.source = @output
  else
    super
  end
end
validate(color) click to toggle source
# File lib/ayadn/set.rb, line 647
def validate(color)
  Validators.color(color)
end