Class: Semaph::Shells::Organisations::OrganisationsListCommand
- Inherits:
-
Object
- Object
- Semaph::Shells::Organisations::OrganisationsListCommand
- Defined in:
- lib/semaph/shells/organisations/organisations_list_command.rb
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(_whatever) ⇒ Object
-
#initialize(organisations) ⇒ OrganisationsListCommand
constructor
A new instance of OrganisationsListCommand.
Constructor Details
#initialize(organisations) ⇒ OrganisationsListCommand
Returns a new instance of OrganisationsListCommand.
7 8 9 10 |
# File 'lib/semaph/shells/organisations/organisations_list_command.rb', line 7 def initialize(organisations) @organisations = organisations @help = "list available organisations" end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
5 6 7 |
# File 'lib/semaph/shells/organisations/organisations_list_command.rb', line 5 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
5 6 7 |
# File 'lib/semaph/shells/organisations/organisations_list_command.rb', line 5 def usage @usage end |
Instance Method Details
#execute(_whatever) ⇒ Object
12 13 14 15 16 |
# File 'lib/semaph/shells/organisations/organisations_list_command.rb', line 12 def execute(_whatever) @organisations.each do |organisation| puts organisation["host"].split(".").first end end |