Class: Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/super_awesome_print/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



4
5
6
7
8
9
10
# File 'lib/super_awesome_print/configuration.rb', line 4

def initialize
  @caller_lines = 1
  @blank_lines_top = 0
  @blank_lines_bottom = 0
  @root_path = defined?(Rails) ? Rails.root.to_s : ''
  @log_file_path = @root_path.empty? ? Dir.pwd + '/sapf.log' : @root_path + '/log/sapf.log'
end

Instance Attribute Details

#blank_lines_bottomObject

Returns the value of attribute blank_lines_bottom.



2
3
4
# File 'lib/super_awesome_print/configuration.rb', line 2

def blank_lines_bottom
  @blank_lines_bottom
end

#blank_lines_topObject

Returns the value of attribute blank_lines_top.



2
3
4
# File 'lib/super_awesome_print/configuration.rb', line 2

def blank_lines_top
  @blank_lines_top
end

#caller_linesObject

Returns the value of attribute caller_lines.



2
3
4
# File 'lib/super_awesome_print/configuration.rb', line 2

def caller_lines
  @caller_lines
end

#log_file_pathObject

Returns the value of attribute log_file_path.



2
3
4
# File 'lib/super_awesome_print/configuration.rb', line 2

def log_file_path
  @log_file_path
end

#root_pathObject

Returns the value of attribute root_path.



2
3
4
# File 'lib/super_awesome_print/configuration.rb', line 2

def root_path
  @root_path
end