Class: PartialLogging::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#absolute_path(show_full_path = nil) ⇒ Object

If true, render the absolute path to the partial, otherwise render ‘(app root)/app/views/chill/_sauce.html.erb’



15
16
17
18
19
20
21
# File 'lib/partial_logging/configuration.rb', line 15

def absolute_path(show_full_path=nil)
  if show_full_path.nil?
    @absolute_path
  else
    self.absolute_path = show_full_path
  end
end

Instance Method Details

#absolute_path?Boolean



23
24
25
# File 'lib/partial_logging/configuration.rb', line 23

def absolute_path?
  !!absolute_path
end

#log_partials(&block) ⇒ Object



5
6
7
# File 'lib/partial_logging/configuration.rb', line 5

def log_partials(&block)
  @log_partials = block
end

#log_partials?Boolean



9
10
11
# File 'lib/partial_logging/configuration.rb', line 9

def log_partials?
  @log_partials && @log_partials.call
end