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

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

Constant Summary

Constants inherited from Pod::Command::Thumbs

DEFAULT_PLATFORM_VERSIONS, THUMBS_TMP_DIR

Instance Attribute Summary

Attributes inherited from Pod::Command::Thumbs

#name, #platform, #platform_version, #requirement

Instance Method Summary collapse

Methods inherited from Pod::Command::Thumbs

options

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

#runObject



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