class Ayadn::SetCounts
Public Class Methods
new()
click to toggle source
Calls superclass method
Ayadn::SetBase::new
# File lib/ayadn/set.rb, line 554 def initialize super @category = 'counts' end
Public Instance Methods
method_missing(meth, options)
click to toggle source
Calls superclass method
# File lib/ayadn/set.rb, line 563 def method_missing(meth, options) @input = meth.to_s.capitalize @output = validate(options.to_i) case meth.to_s when 'default' Settings.options.counts.default = @output when 'unified' Settings.options.counts.unified = @output when 'checkins' Settings.options.counts.checkins = @output when 'conversations' Settings.options.counts.conversations = @output when 'global' Settings.options.counts.global = @output when 'photos' Settings.options.counts.photos = @output when 'trending' Settings.options.counts.trending = @output when 'mentions' Settings.options.counts.mentions = @output when 'convo' Settings.options.counts.convo = @output when 'posts' Settings.options.counts.posts = @output when 'messages' Settings.options.counts.messages = @output when 'search' Settings.options.counts.search = @output when 'whoreposted' Settings.options.counts.whoreposted = @output when 'whostarred' Settings.options.counts.whostarred = @output when 'whatstarred' Settings.options.counts.whatstarred = @output when 'files' Settings.options.counts.files = @output else super end end
validate(value)
click to toggle source
# File lib/ayadn/set.rb, line 559 def validate(value) Validators.index_range(1, 200, value) end