Class: VR::DateCol
- Inherits:
-
Object
- Object
- VR::DateCol
- Defined in:
- lib/treeview/columns/DateCol.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
Instance Method Summary collapse
-
#initialize(date, format = "%Y-%m-%d") ⇒ DateCol
constructor
A new instance of DateCol.
- #set_date(date, format = "%Y-%m-%d") ⇒ Object
Constructor Details
#initialize(date, format = "%Y-%m-%d") ⇒ DateCol
Returns a new instance of DateCol.
9 10 11 |
# File 'lib/treeview/columns/DateCol.rb', line 9 def initialize(date, format = "%Y-%m-%d") set_date(date, format) end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
7 8 9 |
# File 'lib/treeview/columns/DateCol.rb', line 7 def date @date end |
Instance Method Details
#set_date(date, format = "%Y-%m-%d") ⇒ Object
13 14 15 16 |
# File 'lib/treeview/columns/DateCol.rb', line 13 def set_date(date, format = "%Y-%m-%d") @date = date # gsub!(self, @date.strftime(format)) end |