Module: DocxReport::BlockValue
Instance Method Summary collapse
Instance Method Details
#load_text_direction(item) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/docx_report/block_value.rb', line 12 def load_text_direction(item) if @value.is_a? Proc val = @value.call(item) val.is_a?(Hash) ? val[:text_direction] : :none else :none end end |
#load_value(item) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/docx_report/block_value.rb', line 3 def load_value(item) if @value.is_a? Proc val = @value.call(item) val.is_a?(Hash) ? val[:value] : val else item.is_a?(Hash) ? item[@value] : item.send(@value) end end |