Skip to content

Tiny Elixir module to easily get a list of fields for structs.

License

Notifications You must be signed in to change notification settings

nTraum/struct_fields

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StructFields

Build Status Hex.pm

Tiny module to easily get a list of fields for structs.

Example

defmodule MyModule do
  use StructFields

  defstruct [:foo, :bar]
end

MyModule.fields
#=> [:bar, :foo]

Installation

  1. Add struct_fields to your list of dependencies in mix.exs:
def deps do
  [{:struct_fields, "~> 0.2.0"}]
end
  1. Ensure struct_fields is started before your application:
def application do
  [applications: [:struct_fields]]
end

Documentation

http://hexdocs.pm/struct_fields

About

Tiny Elixir module to easily get a list of fields for structs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages