Class: Jisota::Role

Inherits:
Object
  • Object
show all
Defined in:
lib/jisota/role.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, &block) ⇒ Role

Returns a new instance of Role.



6
7
8
9
# File 'lib/jisota/role.rb', line 6

def initialize(name = nil, &block)
  @name = name
  @script_block = ScriptBlock.new(&block) if block_given?
end

Instance Attribute Details

#nameObject Also known as: key

Returns the value of attribute name.



3
4
5
# File 'lib/jisota/role.rb', line 3

def name
  @name
end

#script_blockObject

Returns the value of attribute script_block.



3
4
5
# File 'lib/jisota/role.rb', line 3

def script_block
  @script_block
end