Class: Pod::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/stool/Core/LibInfo.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Spec

Returns a new instance of Spec.

Yields:

  • (_self)

Yield Parameters:

  • _self (Pod::Spec)

    the object that the method was called on



59
60
61
62
63
64
65
# File 'lib/stool/Core/LibInfo.rb', line 59

def initialize
  @ios = Ios.new()
  @osx = Osx.new()
  @tvos = Tvos.new()
  @watchos = Watchos.new()
  yield self if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *arguments, &block) ⇒ Object

attr_accessor :name attr_accessor :name



53
54
55
# File 'lib/stool/Core/LibInfo.rb', line 53

def method_missing(method_id, *arguments, &block)
  # puts "***" + "method_id = #{method_id}"
end

Instance Attribute Details

#homepageObject

Returns the value of attribute homepage.



49
50
51
# File 'lib/stool/Core/LibInfo.rb', line 49

def homepage
  @homepage
end

#iosObject

Returns the value of attribute ios.



43
44
45
# File 'lib/stool/Core/LibInfo.rb', line 43

def ios
  @ios
end

#nameObject

Returns the value of attribute name.



41
42
43
# File 'lib/stool/Core/LibInfo.rb', line 41

def name
  @name
end

#osxObject

Returns the value of attribute osx.



44
45
46
# File 'lib/stool/Core/LibInfo.rb', line 44

def osx
  @osx
end

#summaryObject

简介



48
49
50
# File 'lib/stool/Core/LibInfo.rb', line 48

def summary
  @summary
end

#tvosObject

Returns the value of attribute tvos.



45
46
47
# File 'lib/stool/Core/LibInfo.rb', line 45

def tvos
  @tvos
end

#versionObject

Returns the value of attribute version.



42
43
44
# File 'lib/stool/Core/LibInfo.rb', line 42

def version
  @version
end

#watchosObject

Returns the value of attribute watchos.



46
47
48
# File 'lib/stool/Core/LibInfo.rb', line 46

def watchos
  @watchos
end

Class Method Details

.fromFile(path) ⇒ Object



67
68
69
70
# File 'lib/stool/Core/LibInfo.rb', line 67

def self.fromFile(path)
  content = File.open(path, 'r:utf-8', &:read)
  eval(content,nil,path.to_s)
end