Sha256: 3f74c3e1d8276eb84775a5a7050c2cb922e773e48c97d170209b5f38fce18be9
Contents?: true
Size: 279 Bytes
Versions: 36
Compression:
Stored size: 279 Bytes
Contents
require "virtus" module Cobrato module Entities class Base include Virtus.model attribute :_links, Array def url(action) link = _links.detect { |l| l["rel"].to_s == action.to_s } || {} link.fetch("href", "") end end end end
Version data entries
36 entries across 36 versions & 1 rubygems