Class: CBTRUBY::CbtClient::Browsers
- Inherits:
-
Object
- Object
- CBTRUBY::CbtClient::Browsers
- Defined in:
- lib/cbt_ruby/browsers.rb
Instance Method Summary collapse
-
#add(browser) ⇒ Object
takes a CbtClient::Browser object as input and adds it to the list of browsers.
-
#initialize ⇒ Browsers
constructor
A new instance of Browsers.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Browsers
Returns a new instance of Browsers.
3 4 5 |
# File 'lib/cbt_ruby/browsers.rb', line 3 def initialize @browsers = [] end |
Instance Method Details
#add(browser) ⇒ Object
takes a CbtClient::Browser object as input and adds it to the list of browsers
8 9 10 |
# File 'lib/cbt_ruby/browsers.rb', line 8 def add(browser) @browsers.push(browser) end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/cbt_ruby/browsers.rb', line 12 def to_s @browsers.map(&:to_s).join(',') end |