Class: PeepingTom::Peeper
- Inherits:
-
Object
- Object
- PeepingTom::Peeper
- Defined in:
- lib/peeping_tom/peeper.rb
Instance Attribute Summary collapse
-
#sites ⇒ Object
readonly
Returns the value of attribute sites.
Instance Method Summary collapse
-
#initialize ⇒ Peeper
constructor
A new instance of Peeper.
- #register(name, url, opts = {}) ⇒ Object
Constructor Details
#initialize ⇒ Peeper
Returns a new instance of Peeper.
5 6 7 |
# File 'lib/peeping_tom/peeper.rb', line 5 def initialize @sites = {} end |
Instance Attribute Details
#sites ⇒ Object (readonly)
Returns the value of attribute sites.
3 4 5 |
# File 'lib/peeping_tom/peeper.rb', line 3 def sites @sites end |
Instance Method Details
#register(name, url, opts = {}) ⇒ Object
9 10 11 |
# File 'lib/peeping_tom/peeper.rb', line 9 def register(name, url, opts = {}) @sites[name] = Site.new(name, url, opts) end |