Permalink
Browse files

Move type definitions to include/types.hrl

Updates tree() type
  • Loading branch information...
1 parent b1810bf commit d59bd183e3eb52264e19bbb0a36282b0f40e486b @lafka committed Aug 26, 2012
Showing with 10 additions and 9 deletions.
  1. +1 −9 include/rest.hrl
  2. +9 −0 include/types.hrl
View
10 include/rest.hrl
@@ -1,12 +1,4 @@
--type key() :: atom().
--type value() :: binary() | tree().
--type tree() :: [{key(), value()}].
--type tree(Root) :: [{Root, [{key(), value()}]}].
--type timestamp() :: non_neg_integer().
--type mime() :: {binary(), binary(), []}.
--type request_method() :: atom().
--type mime_charset() :: {binary(), binary(), binary()}.
--type mime_options() :: {binary(), binary(), [{binary(), binary()}]}.
+-include("types.hrl").
-record(tavern, {
module :: module(),
View
9 include/types.hrl
@@ -0,0 +1,9 @@
+-type key() :: atom().
+-type value() :: binary() | number() | string() | tree().
+-type tree() :: [{key(), value()}].
+-type tree(Root) :: [{Root, [{key(), value()}]}].
+-type timestamp() :: non_neg_integer().
+-type mime() :: {binary(), binary(), []}.
+-type request_method() :: atom().
+-type mime_charset() :: {binary(), binary(), binary()}.
+-type mime_options() :: {binary(), binary(), [{binary(), binary()}]}.

0 comments on commit d59bd18

Please sign in to comment.