Sha256: e87948daf90660a81347e74c13e8a0e3f10cbf4317979f95b6de9610653b700f

Contents?: true

Size: 743 Bytes

Versions: 15

Compression:

Stored size: 743 Bytes

Contents

module RequestLogAnalyzer::Output

  def self.const_missing(const)
    RequestLogAnalyzer::load_default_class_file(self, const)
  end
  
  class Base
    
    attr_accessor :io, :options, :style
    
    def initialize(io, options = {})
      @io      = io
      @options = options
      @style   = options[:style] || { :cell_separator => true, :table_border => false }
    end

    def with_style(temp_style = {})
      old_style = @style
      @style = @style.merge(temp_style)
      yield(self) if block_given?
      @style = old_style
    end    
    
    def header
    end
    
    def footer
    end
    
    protected
    
    def table_has_header?(columns)
      columns.any? { |column| !column[:title].nil? } 
    end
    
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
wvanbergen-request-log-analyzer-1.1.1 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.2 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.3 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.4 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.5.1 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.6 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.1.7 lib/request_log_analyzer/output.rb
wvanbergen-request-log-analyzer-1.2.0 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.6 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.5.1 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.2 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.3 lib/request_log_analyzer/output.rb
request-log-analyzer-1.2.0 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.4 lib/request_log_analyzer/output.rb
request-log-analyzer-1.1.1 lib/request_log_analyzer/output.rb