Class: Fvm::CLI::Build

Inherits:
ActiveResource::Base
  • Object
show all
Includes:
Comparable
Defined in:
lib/fvm/cli/build.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.sdk(name) ⇒ Object



13
14
15
# File 'lib/fvm/cli/build.rb', line 13

def self.sdk( name )
  all( :params => { :sdk => name } )
end

.version(name) ⇒ Object



17
18
19
# File 'lib/fvm/cli/build.rb', line 17

def self.version( name )
  all( :params => { :version => name } )
end

Instance Method Details

#<=>(other) ⇒ Object



35
36
37
# File 'lib/fvm/cli/build.rb', line 35

def <=>( other )
  Versionomy.parse( version ) <=> Versionomy.parse( other.version )
end

#active?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/fvm/cli/build.rb', line 25

def active?
  Fvm::System.active?( self )
end

#to_menuObject



29
30
31
32
33
# File 'lib/fvm/cli/build.rb', line 29

def to_menu
  out = [ version, milestone ]
  out.unshift '*' if active?
  out.join ' '
end

#zip_urlObject



21
22
23
# File 'lib/fvm/cli/build.rb', line 21

def zip_url
  "http://fpdownload.adobe.com/pub/flex/sdk/builds/flex#{sdk.to_s.downcase}/flex_sdk_#{version}_mpl.zip"
end