Class: Contrast::Agent::Reporting::Settings::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/contrast/agent/reporting/settings/bot_blocker.rb

Overview

This class is used to represent a Bot entity inside the bots array.

Constant Summary collapse

ATTRIBUTES =
%i[bot case_sensitive start_anchor].cs__freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBot

Returns a new instance of Bot.



51
52
53
54
55
# File 'lib/contrast/agent/reporting/settings/bot_blocker.rb', line 51

def initialize
  # default values of properties:
  @start_anchor = false
  @case_sensitive = false
end

Instance Attribute Details

#botObject

Returns the value of attribute bot.



44
45
46
# File 'lib/contrast/agent/reporting/settings/bot_blocker.rb', line 44

def bot
  @bot
end

#case_sensitiveObject

or not.



47
48
49
# File 'lib/contrast/agent/reporting/settings/bot_blocker.rb', line 47

def case_sensitive
  @case_sensitive
end

#start_anchorObject

Returns the value of attribute start_anchor.



49
50
51
# File 'lib/contrast/agent/reporting/settings/bot_blocker.rb', line 49

def start_anchor
  @start_anchor
end

Instance Method Details

#to_controlled_hashObject



57
58
59
60
61
62
63
# File 'lib/contrast/agent/reporting/settings/bot_blocker.rb', line 57

def to_controlled_hash
  {
      bot: bot,
      caseSensitive: case_sensitive,
      startAnchor: start_anchor
  }
end