lib/stw_engine/config.rb in stw_engine-0.0.2 vs lib/stw_engine/config.rb in stw_engine-0.0.3

- old
+ new

@@ -10,13 +10,12 @@ # mandatory self.api_key = c[:api_key] self.api_secret = c[:api_secret] # optional - self.mode = c[:mode] if c[:mode] - self.api_version = c[:api_version] if c[:api_version] - self.api_url = c[:api_url] if c[:api_url] + self.size = c[:size] if c[:size] + end def api_key=api_key @api_key=api_key end @@ -31,9 +30,17 @@ end def api_secret raise 'StwEngine error: No api secret defined!' if @api_secret.nil? @api_secret + end + + def size=size + @size = size + end + + def size + @size end def mode=mode raise "StwEngine error: Invalid mode, only #{ MODES.join(', ') } are allowed" unless MODES.include?(mode.to_s) @mode = mode.to_s