Skip to content

Commit

Permalink
Update own profile
Browse files Browse the repository at this point in the history
  • Loading branch information
naoty committed Aug 12, 2012
1 parent 9117bc9 commit 50f47c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/cuiabout.rb
Expand Up @@ -47,6 +47,18 @@ def signup *args
system "curl -X POST -d '#{data}' #{ROOT_PATH}/signup"
end

def update *args
abort 'ERROR: Please specify your name' if args.empty?

name = args.shift
password = ask_password
data = "password=#{password}"
args.each do |arg|
data += "&#{arg}"
end
system "curl -X PUT -d '#{data}' #{ROOT_PATH}/#{name}"
end

def method_missing method_or_name, *args
if listed? method_or_name
show method_or_name
Expand Down

0 comments on commit 50f47c6

Please sign in to comment.