Sha256: ad03ece7c973d598b300497a027cc84b71b6c7f5b4b3fc908a608f58dd1e051a

Contents?: true

Size: 822 Bytes

Versions: 10

Compression:

Stored size: 822 Bytes

Contents

module DNSimple
  module Commands
    class ExtendedAttributeList
      def execute(args, options = {})
        tld = args.shift
        extended_attributes = ExtendedAttribute.find(tld)
        puts "Extended attributes: "
        extended_attributes.each do |extended_attribute|
          o = "  #{extended_attribute.name}"
          o << " (required)" if extended_attribute.required
          o << " : #{extended_attribute.description}\n"
          unless extended_attribute.options.empty?
            o << "    Options:\n"
            extended_attribute.options.each do |option|
              o << "      #{option.title}: #{option.value}"
              o << " (#{option.description})" if option.description
              o << "\n"
            end
          end
          puts o
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dnsimple-ruby-1.7.1 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.7.0 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.6.0 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.5.5 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.5.4 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.5.3 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.5.2 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.5.1 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.4.1 lib/dnsimple/commands/extended_attribute_list.rb
dnsimple-ruby-1.4.0 lib/dnsimple/commands/extended_attribute_list.rb