Class: Cliptic::Interface::SQL_Menu_With_Stats
- Inherits:
-
Menu_With_Stats
- Object
- Curses::Window
- Windows::Window
- Menu_Box
- Menu
- Menu_With_Stats
- Cliptic::Interface::SQL_Menu_With_Stats
- Includes:
- Database
- Defined in:
- lib/cliptic/interface.rb
Direct Known Subclasses
Constant Summary
Constants included from Database
Database::Dir_Path, Database::File_Path
Constants included from Chars
Chars::Block, Chars::HL, Chars::LL, Chars::LS, Chars::LU, Chars::MS, Chars::Nums, Chars::RL, Chars::RS, Chars::RU, Chars::TD, Chars::TL, Chars::TR, Chars::TU, Chars::Tick, Chars::VL, Chars::XX
Instance Attribute Summary collapse
-
#dates ⇒ Object
readonly
Returns the value of attribute dates.
Attributes inherited from Menu_With_Stats
Attributes inherited from Menu
Attributes inherited from Menu_Box
#bot_b, #draw_bars, #logo, #title, #top_b
Attributes inherited from Windows::Window
#centered_x, #centered_y, #col, #line, #x, #y
Instance Method Summary collapse
-
#initialize(table:) ⇒ SQL_Menu_With_Stats
constructor
A new instance of SQL_Menu_With_Stats.
- #opts ⇒ Object
- #stat_date ⇒ Object
Methods inherited from Menu_With_Stats
#enter, #hide, #reset_pos, #update_stats
Methods inherited from Menu
#back, #choose_opt, #ctrls, #enter, #hide, #redraw, #reset_pos, #show
Methods inherited from Menu_Box
#add_title, #draw, #line, #reset_pos
Methods inherited from Windows::Window
#add_str, #bold, #clear, #color, #draw, #move, #refresh, #reset_attrs, #reset_pos, #setpos, #standend, #standout, #time_str, #wrap_str
Methods included from Chars
Constructor Details
#initialize(table:) ⇒ SQL_Menu_With_Stats
Returns a new instance of SQL_Menu_With_Stats.
246 247 248 249 250 |
# File 'lib/cliptic/interface.rb', line 246 def initialize(table:) @dates = table.new .select_list.map{|d| Date.parse(d[0])} super end |
Instance Attribute Details
#dates ⇒ Object (readonly)
Returns the value of attribute dates.
245 246 247 |
# File 'lib/cliptic/interface.rb', line 245 def dates @dates end |
Instance Method Details
#opts ⇒ Object
251 252 253 |
# File 'lib/cliptic/interface.rb', line 251 def opts dates.map{|d| d.to_long} || [nil] end |
#stat_date ⇒ Object
254 255 256 |
# File 'lib/cliptic/interface.rb', line 254 def stat_date dates[selector.cursor] end |