Class: Rack::DetectRobotsResult
- Inherits:
-
Object
- Object
- Rack::DetectRobotsResult
- Defined in:
- lib/rack_detect_robots.rb
Instance Attribute Summary collapse
-
#robot_name ⇒ Object
readonly
Returns the value of attribute robot_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(robot_name) ⇒ DetectRobotsResult
constructor
A new instance of DetectRobotsResult.
- #robot? ⇒ Boolean
Constructor Details
#initialize(robot_name) ⇒ DetectRobotsResult
Returns a new instance of DetectRobotsResult.
6 7 8 9 |
# File 'lib/rack_detect_robots.rb', line 6 def initialize(robot_name) @robot_name=robot_name @is_robot = !!robot_name #no name no robot end |
Instance Attribute Details
#robot_name ⇒ Object (readonly)
Returns the value of attribute robot_name.
10 11 12 |
# File 'lib/rack_detect_robots.rb', line 10 def robot_name @robot_name end |
Class Method Details
.no_robot ⇒ Object
3 4 5 |
# File 'lib/rack_detect_robots.rb', line 3 def self.no_robot new(nil) end |
Instance Method Details
#robot? ⇒ Boolean
11 12 13 |
# File 'lib/rack_detect_robots.rb', line 11 def robot? @is_robot end |