Sha256: df542835add443634caa66990e682c516b4ca56f9f0ae517f53cc6bd75d2620d

Contents?: true

Size: 343 Bytes

Versions: 20

Compression:

Stored size: 343 Bytes

Contents

module Spout
  module Models
    class Option
      attr_accessor :display_name, :value, :description

      def initialize(option_hash)
        %w( display_name value description ).each do |method|
          instance_variable_set("@#{method}", (option_hash.kind_of?(Hash) ? option_hash : {})[method])
        end
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
spout-0.10.0.beta9 lib/spout/models/option.rb
spout-0.10.0.beta8 lib/spout/models/option.rb
spout-0.10.0.beta7 lib/spout/models/option.rb
spout-0.10.0.beta6 lib/spout/models/option.rb
spout-0.10.0.beta4 lib/spout/models/option.rb
spout-0.10.0.beta3 lib/spout/models/option.rb
spout-0.10.0.beta2 lib/spout/models/option.rb
spout-0.10.0.beta1 lib/spout/models/option.rb
spout-0.9.1 lib/spout/models/option.rb
spout-0.9.0 lib/spout/models/option.rb
spout-0.9.0.rc lib/spout/models/option.rb
spout-0.9.0.beta2 lib/spout/models/option.rb
spout-0.9.0.beta1 lib/spout/models/option.rb
spout-0.8.0 lib/spout/models/option.rb
spout-0.8.0.rc5 lib/spout/models/option.rb
spout-0.8.0.rc4 lib/spout/models/option.rb
spout-0.8.0.rc3 lib/spout/models/option.rb
spout-0.8.0.rc2 lib/spout/models/option.rb
spout-0.8.0.rc lib/spout/models/option.rb
spout-0.8.0.beta15 lib/spout/models/option.rb