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.



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

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#android?Boolean

Returns:

  • (Boolean)


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

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

#ios?Boolean

Returns:

  • (Boolean)


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

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

#is_platform?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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)


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

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

#project_nameObject



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

def project_name
  @options[:project_name]
end

#project_pathObject



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

def project_path
  @options[:project_path]
end