class Commands::Share
Attributes
email_list[R]
Public Class Methods
new(client, params)
click to toggle source
Calls superclass method
Commands::Command::new
# File lib/gdsh/share.rb, line 11 def initialize(client, params) super(client, params) @email_list = [] @file_id = @params[1] @params.drop(2).each do |email| @email_list << email end end
parameters()
click to toggle source
# File lib/gdsh/share.rb, line 7 def self.parameters '(<file_id>[, <email_1>, <email_2>, ...])' end
Public Instance Methods
role_with_colours(role)
click to toggle source
# File lib/gdsh/share.rb, line 20 def role_with_colours(role) case role when 'reader' 'read-only'.colorize(:green) when 'writer' 'read-write'.colorize(:blue) when 'owner' 'owner'.colorize(:magenta) else 'error'.colorize(:red) end end