Sha256: 7348994890d981c0a666aae8821a3db3d981594049ed9d3c3f0ee0dfb9e9231b

Contents?: true

Size: 721 Bytes

Versions: 12

Compression:

Stored size: 721 Bytes

Contents

require_relative 'arg_loader'

module Squib
  # @api private
  module Args

    class SvgSpecial
      include ArgLoader

      def self.parameters
        { data: nil, id: nil, force_id: false }
      end

      def self.expanding_parameters
        parameters.keys # all of them
      end

      def self.params_with_units
        []
      end

      def validate_id(arg, _i)
        return nil if arg.nil?
        arg = '#' << arg unless arg.start_with? '#'
        arg
      end

      # Only render if we have an ID specified, or we are forcing an ID
      def render?(i)
        return false if force_id[i] && id[i].to_s.empty?
        return true
      end

    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
squib-0.14.3.pre1 lib/squib/args/svg_special.rb
squib-0.14.1 lib/squib/args/svg_special.rb
squib-0.14.0 lib/squib/args/svg_special.rb
squib-0.14.beta1 lib/squib/args/svg_special.rb
squib-0.13.4 lib/squib/args/svg_special.rb
squib-0.13.3 lib/squib/args/svg_special.rb
squib-0.13.2 lib/squib/args/svg_special.rb
squib-0.13.1 lib/squib/args/svg_special.rb
squib-0.13.0 lib/squib/args/svg_special.rb
squib-0.12.0 lib/squib/args/svg_special.rb
squib-0.11.0 lib/squib/args/svg_special.rb
squib-0.10.0 lib/squib/args/svg_special.rb