Class: Sparkleology::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/sparkleology/command.rb

Class Method Summary collapse

Class Method Details

.feed_url?(app_name_or_feed_url) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/sparkleology/command.rb', line 8

def self.feed_url?(app_name_or_feed_url)
  app_name_or_feed_url =~ /:/
end

.for(app_name_or_feed_url) ⇒ Object



2
3
4
5
6
# File 'lib/sparkleology/command.rb', line 2

def self.for(app_name_or_feed_url)
  feed_url?(app_name_or_feed_url) ?
    Sparkleology::LatestVersionCommand.new(app_name_or_feed_url) :
    Sparkleology::FindApplicationCommand.new(app_name_or_feed_url)
end