Class: Qricker::RickerSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/qricker/module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path) ⇒ RickerSpec

Returns a new instance of RickerSpec.



8
9
10
11
12
# File 'lib/qricker/module.rb', line 8

def initialize(name, path)
  @name = name
  @path = path
  @specification = nil
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/qricker/module.rb', line 5

def name
  @name
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/qricker/module.rb', line 6

def path
  @path
end

Instance Method Details

#podSpecilicationObject



25
26
27
28
29
30
31
# File 'lib/qricker/module.rb', line 25

def podSpecilication
  if @specification.nil?
    specPath = Pathname(@path).join("#{@name}.podspec")
    @specification = Pod::Specification.from_file(specPath.to_path)
  end
  return @specification
end

#to_sObject



21
22
23
# File 'lib/qricker/module.rb', line 21

def to_s
  "RickerSpec name:#{@name} path:#{@path}"
end

#valid?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
# File 'lib/qricker/module.rb', line 14

def valid?
  if @specification.nil?
    return false
  end
  return true
end