Class: Pod::Command::Thumbs::Server

Inherits:
Thumbs
  • Object
show all
Defined in:
lib/cocoapods-thumbs/command/thumbs/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Server

Returns a new instance of Server.



10
11
12
13
# File 'lib/cocoapods-thumbs/command/thumbs/server.rb', line 10

def initialize(argv)
  @url = argv.shift_argument
  super
end

Instance Method Details

#run ⇒ Object



19
20
21
22
23
24
25
# File 'lib/cocoapods-thumbs/command/thumbs/server.rb', line 19

def run
  Pod::Thumbs::Configuration.set_url(@url)
  
  UI.title("Server configured") do
    UI.labeled 'URL', @url
  end
end

#validate! ⇒ Object



15
16
17
# File 'lib/cocoapods-thumbs/command/thumbs/server.rb', line 15

def validate!
  help! 'Please specify a server URL.' unless @url
end