Method: LibGems::Specification#encode_with
- Defined in:
- lib/libgems/specification.rb
#encode_with(coder) ⇒ Object
:nodoc:
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'lib/libgems/specification.rb', line 679 def encode_with coder # :nodoc: mark_version attributes = @@attributes.map { |name,| name.to_s }.sort attributes = attributes - %w[name version platform] coder.add 'name', @name coder.add 'version', @version platform = case @original_platform when nil, '' then 'ruby' when String then @original_platform else @original_platform.to_s end coder.add 'platform', platform attributes.each do |name| coder.add name, instance_variable_get("@#{name}") end end |