Class: SpeedGun::Browser::Navigation
- Inherits:
-
Hash
- Object
- Hash
- SpeedGun::Browser::Navigation
- Defined in:
- lib/speed_gun/browser/navigation.rb
Constant Summary collapse
- NAVIGATION_TYPES =
[ 'Navigate', 'Reload', 'Back/Forward' ]
Instance Method Summary collapse
-
#initialize(hash) ⇒ Navigation
constructor
A new instance of Navigation.
- #redirect_count ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(hash) ⇒ Navigation
Returns a new instance of Navigation.
10 11 12 13 14 |
# File 'lib/speed_gun/browser/navigation.rb', line 10 def initialize(hash) hash.each_pair do |key, val| self[key.to_s.to_sym] = val end end |
Instance Method Details
#redirect_count ⇒ Object
20 21 22 |
# File 'lib/speed_gun/browser/navigation.rb', line 20 def redirect_count self[:redirect_count].to_i end |
#type ⇒ Object
16 17 18 |
# File 'lib/speed_gun/browser/navigation.rb', line 16 def type NAVIGATION_TYPES[self[:type].to_i] || 'Unknown' end |