Class: Souyuz::Msbuild::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/souyuz/msbuild/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Project

Returns a new instance of Project.



6
7
8
# File 'lib/souyuz/msbuild/project.rb', line 6

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/souyuz/msbuild/project.rb', line 4

def options
  @options
end

Instance Method Details

#android?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/souyuz/msbuild/project.rb', line 26

def android?
  is_platform? Souyuz::Platform::ANDROID
end

#ios?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/souyuz/msbuild/project.rb', line 18

def ios?
  is_platform? Souyuz::Platform::IOS
end

#is_platform?(platform) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
38
39
40
# File 'lib/souyuz/msbuild/project.rb', line 30

def is_platform?(platform)
  return case platform
         when Souyuz::Platform::IOS
      then self.project_name.downcase.include? 'ios'
         when Souyuz::Platform::OSX
      then self.project_name.downcase.include? 'mac'
         when Souyuz::Platform::ANDROID
      then self.project_name.downcase.include? 'droid'
         else false
         end
end

#osx?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/souyuz/msbuild/project.rb', line 22

def osx?
  is_platform? Souyuz::Platform::OSX
end

#project_nameObject



10
11
12
# File 'lib/souyuz/msbuild/project.rb', line 10

def project_name
  @options[:project_name]
end

#project_pathObject



14
15
16
# File 'lib/souyuz/msbuild/project.rb', line 14

def project_path
  @options[:project_path]
end