Class: USaidWat::CLI::BaseFormatter
- Inherits:
-
Object
- Object
- USaidWat::CLI::BaseFormatter
show all
- Includes:
- TTYFormatter
- Defined in:
- lib/usaidwat/formatter/base.rb
Instance Method Summary
collapse
#tty
Constructor Details
#initialize(options = {}) ⇒ BaseFormatter
Returns a new instance of BaseFormatter.
17
18
19
20
|
# File 'lib/usaidwat/formatter/base.rb', line 17
def initialize(options = {})
@options = options
@count = 0
end
|
Instance Method Details
#pattern ⇒ Object
22
23
24
|
# File 'lib/usaidwat/formatter/base.rb', line 22
def pattern
@options[:pattern]
end
|
#pattern? ⇒ Boolean
26
27
28
|
# File 'lib/usaidwat/formatter/base.rb', line 26
def pattern?
!!@options[:pattern]
end
|
#raw? ⇒ Boolean
30
31
32
|
# File 'lib/usaidwat/formatter/base.rb', line 30
def raw?
!!@options[:raw]
end
|
#relative_dates? ⇒ Boolean
34
35
36
|
# File 'lib/usaidwat/formatter/base.rb', line 34
def relative_dates?
@options[:date_format].nil? || @options[:date_format].to_sym != :absolute
end
|