Class: XLSSestavy::ArgumentySestavy
- Inherits:
-
Object
- Object
- XLSSestavy::ArgumentySestavy
- Defined in:
- lib/xls_sestavy/argumenty_sestavy.rb
Instance Attribute Summary collapse
-
#do_data ⇒ Object
Returns the value of attribute do_data.
-
#od_data ⇒ Object
(also: #k_datu)
Returns the value of attribute od_data.
-
#uzivatel_id ⇒ Object
Returns the value of attribute uzivatel_id.
Instance Method Summary collapse
- #argumenty_sloupce(arr) ⇒ Object
-
#initialize(args = {}) ⇒ ArgumentySestavy
constructor
A new instance of ArgumentySestavy.
- #jeden_datum? ⇒ Boolean
- #k_datu=(datum) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ ArgumentySestavy
Returns a new instance of ArgumentySestavy.
9 10 11 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 9 def initialize(args={}) args.each_pair{|k, v| send "#{k}=", v } end |
Instance Attribute Details
#do_data ⇒ Object
Returns the value of attribute do_data.
5 6 7 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 5 def do_data @do_data end |
#od_data ⇒ Object Also known as: k_datu
Returns the value of attribute od_data.
5 6 7 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 5 def od_data @od_data end |
#uzivatel_id ⇒ Object
Returns the value of attribute uzivatel_id.
5 6 7 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 5 def uzivatel_id @uzivatel_id end |
Instance Method Details
#argumenty_sloupce(arr) ⇒ Object
17 18 19 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 17 def argumenty_sloupce(arr) arr.map{|a| (a.class==Symbol && respond_to?(a)) ? send(a) : a} end |
#jeden_datum? ⇒ Boolean
13 14 15 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 13 def jeden_datum? @od_data==@do_data end |
#k_datu=(datum) ⇒ Object
7 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 7 def k_datu=(datum); @od_data = datum; @do_data = datum; end |
#to_s ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/xls_sestavy/argumenty_sestavy.rb', line 21 def to_s return @to_s if defined? @to_s @to_s = if jeden_datum? "#{I18n.l(@od_data, format: :excel)[0..-2]}" else "#{I18n.l(@od_data, format: :excel)[0..-2]}_#{I18n.l(@do_data, format: :excel)[0..-2]}" end end |