Sha256: aa812d6c689adf94d8b882352f3d5917d3fb1a62d2200908191f6a7c2885bb34

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 Bytes

Contents

require 'roar/representer/json/hal'
require 'roar/representer/feature/hypermedia'
require 'active_model'

module Billit
  module TableRepresenter
    include Roar::Representer::JSON::HAL

    module Initializer
      def initialize
        extend Billit::TableRepresenter
        extend Roar::Representer::Feature::Client
        super
      end
    end

    def self.included(klass)
      klass.send :prepend, Initializer
      klass.send :include, Roar::Representer::Feature::HttpVerbs
    end

    property :uid
    property :origin_chamber
    property :creation_date
    property :legislature
    property :session
    property :bills


    link :self do
      bill_url(self.uid)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
billit_representers-0.5.1 lib/billit_representers/representers/table_representer.rb
billit_representers-0.5.0 lib/billit_representers/representers/table_representer.rb