Class: Chkex::Source::Base
- Inherits:
-
Object
- Object
- Chkex::Source::Base
- Defined in:
- lib/chkex/sources/base.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(source_list) ⇒ Base
constructor
A new instance of Base.
- #strip(url) ⇒ Object
Constructor Details
#initialize(source_list) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 12 |
# File 'lib/chkex/sources/base.rb', line 6 def initialize(source_list) @now = Date.today @source = source_list @results = { success: {}, errors: {} } process end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
4 5 6 |
# File 'lib/chkex/sources/base.rb', line 4 def results @results end |
Instance Method Details
#strip(url) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/chkex/sources/base.rb', line 14 def strip(url) url.gsub('http://', '') .gsub('https://', '') .gsub('www.', '') .gsub('/', '') end |