Class: Statlysis::SingleKv
Direct Known Subclasses
Instance Attribute Summary collapse
-
#stat_column_name ⇒ Object
Returns the value of attribute stat_column_name.
-
#time_ago ⇒ Object
Returns the value of attribute time_ago.
Attributes inherited from Top
#logs, #pattern_proc, #result_limit, #stat_model, #user_id_proc, #user_info_proc
Attributes inherited from Cron
#clock, #multiple_dataset, #source_type, #time_column, #time_unit, #time_zone
Instance Method Summary collapse
-
#initialize(source, opts = {}) ⇒ SingleKv
constructor
A new instance of SingleKv.
Methods inherited from Top
#default_assign_attr, #run, #write
Methods inherited from Cron
#_source, #group_by_columns?, #is_activerecord?, #is_mongoid?, #is_orm?, #is_time_column_integer?, #output, #reoutput, #run, #setup_stat_model, #source_where_array, #time_column?, #time_range
Methods included from Common
Constructor Details
#initialize(source, opts = {}) ⇒ SingleKv
Returns a new instance of SingleKv.
41 42 43 44 45 46 |
# File 'lib/statlysis/cron/top.rb', line 41 def initialize source, opts = {} [:time_ago, :stat_column_name].each {|key_symbol| default_assign_attr key_symbol, opts } raise "#{cron.class} only is kv store" if cron.stat_table_name # TODO super cron end |
Instance Attribute Details
#stat_column_name ⇒ Object
Returns the value of attribute stat_column_name.
39 40 41 |
# File 'lib/statlysis/cron/top.rb', line 39 def stat_column_name @stat_column_name end |
#time_ago ⇒ Object
Returns the value of attribute time_ago.
39 40 41 |
# File 'lib/statlysis/cron/top.rb', line 39 def time_ago @time_ago end |