Module: FPM::Fry::Channel::Hint

Included in:
FPM::Fry::Channel
Defined in:
lib/fpm/fry/channel.rb

Instance Method Summary collapse

Instance Method Details

#hint(message, data = {}) ⇒ Object

Logs a message with level ‘hint’

Parameters:

  • message (String)
  • data (Hash) (defaults to: {})


17
18
19
20
# File 'lib/fpm/fry/channel.rb', line 17

def hint( message, data = {} )
  return unless hint?
  log(message, data.merge(level: :hint))
end

#hint=(bool) ⇒ Object

Switched hints on or off



28
29
30
# File 'lib/fpm/fry/channel.rb', line 28

def hint=( bool )
  @hint = !!bool
end

#hint?Boolean

True if hints should be displayed

Returns:

  • (Boolean)


23
24
25
# File 'lib/fpm/fry/channel.rb', line 23

def hint?
  !defined?(@hint) || @hint
end