Class: ReplTalk::Role
- Inherits:
-
Object
- Object
- ReplTalk::Role
- Defined in:
- lib/repltalk/structures.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tagline ⇒ Object
readonly
Returns the value of attribute tagline.
Instance Method Summary collapse
-
#initialize(role) ⇒ Role
constructor
A new instance of Role.
- #to_s ⇒ Object
Constructor Details
#initialize(role) ⇒ Role
Returns a new instance of Role.
8 9 10 11 12 |
# File 'lib/repltalk/structures.rb', line 8 def initialize(role) @name = role["name"] @key = role["key"] @tagline = role["tagline"] end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/repltalk/structures.rb', line 6 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/repltalk/structures.rb', line 6 def name @name end |
#tagline ⇒ Object (readonly)
Returns the value of attribute tagline.
6 7 8 |
# File 'lib/repltalk/structures.rb', line 6 def tagline @tagline end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/repltalk/structures.rb', line 14 def to_s @name end |