Class: Nacha::Formatter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/nacha/formatter/base.rb

Direct Known Subclasses

HtmlFormatter, JsonFormatter, MarkdownFormatter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(records, options = {}) ⇒ Base

Returns a new instance of Base.



10
11
12
13
# File 'lib/nacha/formatter/base.rb', line 10

def initialize(records, options = {})
  @records = records
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/nacha/formatter/base.rb', line 8

def options
  @options
end

#recordsObject (readonly)

Returns the value of attribute records.



8
9
10
# File 'lib/nacha/formatter/base.rb', line 8

def records
  @records
end

Instance Method Details

#formatObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/nacha/formatter/base.rb', line 15

def format
  raise NotImplementedError, 'Subclasses must implement a format method'
end