Class: FilterMapper
- Inherits:
-
Object
- Object
- FilterMapper
- Defined in:
- lib/finviz_rails/filter_mapper.rb
Instance Method Summary collapse
-
#initialize(*params) ⇒ FilterMapper
constructor
A new instance of FilterMapper.
- #run ⇒ Object
Constructor Details
#initialize(*params) ⇒ FilterMapper
Returns a new instance of FilterMapper.
2 3 4 5 |
# File 'lib/finviz_rails/filter_mapper.rb', line 2 def initialize(*params) @params = params.first @param_components = [] end |
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 |
# File 'lib/finviz_rails/filter_mapper.rb', line 7 def run mapper.each do |key, value| @param_components << "#{value}_#{@params[key]}" if @params[key] end @param_components.join(",") end |