Improved code layout.
This commit is contained in:
parent
aa50feed73
commit
b26bdb7261
1 changed files with 8 additions and 6 deletions
|
@ -43,19 +43,21 @@ module Import
|
||||||
end
|
end
|
||||||
|
|
||||||
def role_admin
|
def role_admin
|
||||||
return @role_admin if @role_admin
|
@role_admin ||= lookup('Admin')
|
||||||
@role_admin = ::Role.lookup(name: 'Admin')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def role_agent
|
def role_agent
|
||||||
return @role_agent if @role_agent
|
@role_agent ||= lookup('Agent')
|
||||||
@role_agent = ::Role.lookup(name: 'Agent')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def role_customer
|
def role_customer
|
||||||
return @role_customer if @role_customer
|
@role_customer ||= lookup('Customer')
|
||||||
@role_customer = ::Role.lookup(name: 'Customer')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lookup(role_name)
|
||||||
|
::Role.lookup(name: role_name)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue