Class: Schatter::Command::ListPeople
- Inherits:
-
Object
- Object
- Schatter::Command::ListPeople
- Defined in:
- lib/schatter/command/list_people.rb
Instance Attribute Summary collapse
-
#conversation ⇒ Object
readonly
Returns the value of attribute conversation.
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(*ignored) ⇒ Object
-
#initialize(conversation) ⇒ ListPeople
constructor
A new instance of ListPeople.
Constructor Details
#initialize(conversation) ⇒ ListPeople
Returns a new instance of ListPeople.
4 5 6 7 8 |
# File 'lib/schatter/command/list_people.rb', line 4 def initialize conversation @conversation = conversation @usage = '' @help = 'Lists people in the current conversation' end |
Instance Attribute Details
#conversation ⇒ Object (readonly)
Returns the value of attribute conversation.
2 3 4 |
# File 'lib/schatter/command/list_people.rb', line 2 def conversation @conversation end |
#help ⇒ Object (readonly)
Returns the value of attribute help.
2 3 4 |
# File 'lib/schatter/command/list_people.rb', line 2 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
2 3 4 |
# File 'lib/schatter/command/list_people.rb', line 2 def usage @usage end |
Instance Method Details
#execute(*ignored) ⇒ Object
10 11 12 13 14 |
# File 'lib/schatter/command/list_people.rb', line 10 def execute *ignored conversation.people(true).values.each do |person| puts "#{person.email}" end end |