Class: Thinreports::Preview::Tblock
- Inherits:
-
Object
- Object
- Thinreports::Preview::Tblock
- Defined in:
- lib/thinreports/preview/tblock.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Tblock
constructor
A new instance of Tblock.
- #name ⇒ Object
- #preview_text ⇒ Object
Constructor Details
#initialize(config) ⇒ Tblock
Returns a new instance of Tblock.
4 5 6 |
# File 'lib/thinreports/preview/tblock.rb', line 4 def initialize(config) @config = config end |
Instance Method Details
#name ⇒ Object
8 9 10 |
# File 'lib/thinreports/preview/tblock.rb', line 8 def name @config["id"].to_sym end |
#preview_text ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/thinreports/preview/tblock.rb', line 12 def preview_text if date? format_type_char else ((format_type_char * word_lenght) + return_code) * line_length end end |