Class: IV::CLI::Formatter::Base
- Inherits:
-
Object
- Object
- IV::CLI::Formatter::Base
- Includes:
- Helpers::Errors, Helpers::SubclassRegistration
- Defined in:
- lib/iv-cli/formatters/base.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #output_rows(*args) ⇒ Object
Methods included from Helpers::SubclassRegistration
Methods included from Helpers::Errors
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/iv-cli/formatters/base.rb', line 11 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/iv-cli/formatters/base.rb', line 9 def @options end |
Class Method Details
.find(formatter_type) ⇒ Object
15 16 17 18 |
# File 'lib/iv-cli/formatters/base.rb', line 15 def self.find(formatter_type) fail(4, %|Unable to find formatter for #{formatter_type}|) unless subclasses.include?(formatter_type) subclasses[formatter_type] end |
Instance Method Details
#output_rows(*args) ⇒ Object
20 21 22 23 |
# File 'lib/iv-cli/formatters/base.rb', line 20 def output_rows(*args) #abstract method raise "Abstract method called on IV::CLI::Formatter" end |