Sha256: 6d721e5e70e72e758a1f5003ac7d42026a79b66dfa631e1bec63ba56f4ea7d92

Contents?: true

Size: 370 Bytes

Versions: 24

Compression:

Stored size: 370 Bytes

Contents

module JSONAPIonify::Structure
  module Objects
    class Link < Base
      define_order *%i{href meta}

      may_contain! :href, :meta

      validate! :href, message: 'must be a valid URL' do |*, value|
        if value.is_a?(String)
          uri = URI.parse(value)
          uri.scheme.present?
        else
          false
        end
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
jsonapionify-0.12.10 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.9 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.8 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.7 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.5 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.4 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.3 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.2 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.1 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.12.0 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.11 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.10 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.9 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.8 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.7 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.6 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.5 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.11.0 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.10.2 lib/jsonapionify/structure/objects/link.rb
jsonapionify-0.10.1 lib/jsonapionify/structure/objects/link.rb