Class: Jisota::Role
- Inherits:
-
Object
- Object
- Jisota::Role
- Defined in:
- lib/jisota/role.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #key)
Returns the value of attribute name.
-
#script_block ⇒ Object
Returns the value of attribute script_block.
Instance Method Summary collapse
-
#initialize(name = nil, &block) ⇒ Role
constructor
A new instance of Role.
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
#name ⇒ Object 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_block ⇒ Object
Returns the value of attribute script_block.
3 4 5 |
# File 'lib/jisota/role.rb', line 3 def script_block @script_block end |