Ejemplo n.º 1
0
class UserArgument(arguments.Container):
    """
    UserArguments Container. This is a class that translate
    the business entity to a knew structure for gutter.
    """

    # Generate compatibility with the business model.
    COMPATIBLE_TYPE = User

    name = arguments.String('name')
    age = arguments.Integer('age')
    is_admin = arguments.Boolean('is_admin')
Ejemplo n.º 2
0
class IntegerArguments(arguments.Container):
    COMPATIBLE_TYPE = int

    value = arguments.Integer(lambda self: self.input)
Ejemplo n.º 3
0
class User:
    name = arguments.String(lambda self: self.input.name)
    age = arguments.Integer(lambda self: self.input.age)