Skip to content
Snippets Groups Projects
Commit 44b830fc authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

change module sintax

parent 81e579f3
No related branches found
No related tags found
No related merge requests found
##
# This class represents an specification for listing collections
# The PublicContext class specify all collections with field privacy=public
class Collections::PublicContext < Context
module Collections
class PublicContext < Context
def from
'Collection'
end
def from
'Collection'
end
def privacy
'public'
end
def privacy
'public'
end
end
end
\ No newline at end of file
class UserContext < Context
module Collections
class UserContext < Context
def initialize(user)
@user = user
end
def initialize(user)
@user = user
end
def from
sprintf "select expand(in('BelongsTo')) from %s)", @user.rid
end
def from
sprintf "select expand(in('BelongsTo')) from %s)", @user.rid
end
end
end
\ No newline at end of file
##
# This class represents an specification for listing collections
# The PublicContext class specify all collections with field privacy=public
class Collections::UserPrivateContext < UserContext
module Collections
class UserPrivateContext < UserContext
def privacy
'private'
end
def privacy
'private'
end
end
end
\ No newline at end of file
##
# This class represents an specification for listing collections
# The PublicContext class specify all collections with field privacy=public
class Collections::UserPublicContext < UserContext
module Collections
class UserPublicContext < UserContext
def privacy
'public'
end
def privacy
'public'
end
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment