Sha256: 0445975e654132e02b15ac0e33aa13d2e53b9dd49b2b72df296821837996bc64

Contents?: true

Size: 292 Bytes

Versions: 8

Compression:

Stored size: 292 Bytes

Contents

module Awis
  module Utils
    module Variable
      def custom_instance_variables(options)
        options.each do |key, value|
          value = (value.class == String && value.empty?) ? nil : value

          instance_variable_set("@#{key}", value)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awis-sdk-ruby-1.0.0 lib/awis/utils/variable.rb
awis-sdk-ruby-0.1.1 lib/awis/utils/variable.rb
awis-sdk-ruby-0.1.0 lib/awis/utils/variable.rb
awis-sdk-ruby-0.0.9 lib/awis/utils/variable.rb
awis-sdk-ruby-0.0.8 lib/awis/utils/variable.rb
awis-sdk-ruby-0.0.7 lib/awis/utils/variable.rb
awis-sdk-ruby-0.0.6 lib/awis/utils/variable.rb
awis-sdk-ruby-0.0.5 lib/awis/utils/variable.rb