Class: GhSearch::Formatters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gh_search/formatters/base.rb

Direct Known Subclasses

Csv, Json, Plain

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/gh_search/formatters/base.rb', line 5

def initialize(options={})
  @output_file = options[:output]
end

Instance Attribute Details

#output_fileObject (readonly)

Returns the value of attribute output_file.



4
5
6
# File 'lib/gh_search/formatters/base.rb', line 4

def output_file
  @output_file
end

Instance Method Details

#write!(match) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/gh_search/formatters/base.rb', line 9

def write!(match)
  raise NotImplementedError
end

#write_file!Object



13
14
15
# File 'lib/gh_search/formatters/base.rb', line 13

def write_file!
  # used for writing out a file
end