Class: Bishl::ParamsBuilder
- Inherits:
-
Object
- Object
- Bishl::ParamsBuilder
- Defined in:
- lib/params_builder.rb
Class Method Summary collapse
Class Method Details
.build_link(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/params_builder.rb', line 7 def build_link(={}) raise OptionsNotMetError, "season missing" unless .has_key?(:season) raise OptionsNotMetError, "league missing" unless .has_key?(:cs) url = "?season=#{[:season]}&cs=#{[:cs]}" if .has_key?(:team) url = "#{url}&team=#{[:team]}" end return url end |