Class: ReplTalk::Role

Inherits:
Object
  • Object
show all
Defined in:
lib/repltalk/structures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject (readonly)

Returns the value of attribute key.



6
7
8
# File 'lib/repltalk/structures.rb', line 6

def key
  @key
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/repltalk/structures.rb', line 6

def name
  @name
end

#taglineObject (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_sObject



14
15
16
# File 'lib/repltalk/structures.rb', line 14

def to_s
  @name
end