Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/super_awesome_print/configuration.rb
Instance Attribute Summary collapse
-
#blank_lines_bottom ⇒ Object
Returns the value of attribute blank_lines_bottom.
-
#blank_lines_top ⇒ Object
Returns the value of attribute blank_lines_top.
-
#caller_lines ⇒ Object
Returns the value of attribute caller_lines.
-
#log_file_path ⇒ Object
Returns the value of attribute log_file_path.
-
#root_path ⇒ Object
Returns the value of attribute root_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_bottom ⇒ Object
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_top ⇒ Object
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_lines ⇒ Object
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_path ⇒ Object
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_path ⇒ Object
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 |