Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pragma::Metadata #29

Open
aldesantis opened this issue Jul 22, 2018 · 0 comments
Open

Pragma::Metadata #29

aldesantis opened this issue Jul 22, 2018 · 0 comments
Labels

Comments

@aldesantis
Copy link
Member

aldesantis commented Jul 22, 2018

This would be a gem to associate metadata with any API resources, like Stripe does in their API.

Usage should be pretty simple.

# app/models/post.rb
class Post < ApplicationRecord
  include Pragma::Metadata::Model
  # ...
end

# app/resources/api/v1/post/contract/base.rb
class API::V1::Post::Contract::Base < Pragma::Contract::Base
  include Pragma::Metadata::Contract
  # ...
end

# app/resources/api/v1/post/decorator/instance.rb
class API::V1::Post::Decorator::Instance < Pragma::Decorator::Base
  include Pragma::Metadata::Decorator
  # ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant