Module: IAmICan::ResultOf::Role

Included in:
IAmICan::ResultOf
Defined in:
lib/i_am_i_can/helpers/result_of.rb

Instance Method Summary collapse

Instance Method Details

#role(assignment, i_am_i_can, given: [ ]) ⇒ Object



11
12
13
14
15
16
# File 'lib/i_am_i_can/helpers/result_of.rb', line 11

def role assignment, i_am_i_can, given: [ ]
  ResultOf.(assignment, given, config: i_am_i_can,
          msg_prefix: 'Role Assignment: ',
          fail_msg: 'have not been defined or have been repeatedly assigned!'
  )
end

#roles(definition, i_am_i_can, given: [ ]) ⇒ Object



4
5
6
7
8
9
# File 'lib/i_am_i_can/helpers/result_of.rb', line 4

def roles definition, i_am_i_can, given: [ ]
  ResultOf.(definition, [ [], given ], config: i_am_i_can,
          msg_prefix: 'Role Definition: ',
          fail_msg: 'have been used by other roles!'
  )
end