thrash v0.3.1 Thrash.Constants

Creates functions for the constants defined in your Thrift IDL.

Suppose we have, in a Thrift file:

// in thrift file
const i32 MAX_THINGS = 42
const i32 MAGIC_NUMBER = 99

Bring these values into your Elixir app by doing

defmodule MyApp.Constants
  use Thrash.Constants
end

This will define functions MyApp.Constants.max_things/0 and MyApp.Constants.magic_number/0.