Class: Cliptic::Interface::Date_Selector

Inherits:
Selector show all
Defined in:
lib/cliptic/interface.rb

Constant Summary

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

Attributes inherited from Selector

#ctrls, #cursor, #opts, #run, #tick

Attributes inherited from Windows::Window

#centered_x, #centered_y, #col, #line, #x, #y

Instance Method Summary collapse

Methods inherited from Selector

#select, #stop

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

small_num

Constructor Details

#initialize(opts:, ctrls:, line:, x: 18, tick:) ⇒ Date_Selector

Returns a new instance of Date_Selector.



143
144
145
146
# File 'lib/cliptic/interface.rb', line 143

def initialize(opts:, ctrls:, line:, x:18, tick:)
  super(y:1, x:18, opts:opts, 
        ctrls:ctrls, line:line, tick:tick)
end

Instance Method Details

#format_opt(opt) ⇒ Object



147
148
149
# File 'lib/cliptic/interface.rb', line 147

def format_opt(opt)
  opt.to_s.rjust(2, "0").center(6)
end