Class: AllowedDependency

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-whitelist/model/allowed_dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version, expire, source, target, allows_granular_projects) ⇒ AllowedDependency

Returns a new instance of AllowedDependency.



9
10
11
12
13
14
15
16
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 9

def initialize(name, version, expire, source, target, allows_granular_projects)
  @name = name
  @version = version
  @expire = expire
  @source = source
  @target = target
  @allows_granular_projects = allows_granular_projects
end

Instance Attribute Details

#allows_granular_projectsObject

Returns the value of attribute allows_granular_projects.



7
8
9
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 7

def allows_granular_projects
  @allows_granular_projects
end

#expireObject

Returns the value of attribute expire.



4
5
6
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 4

def expire
  @expire
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 2

def name
  @name
end

#sourceObject

Returns the value of attribute source.



5
6
7
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 5

def source
  @source
end

#targetObject

Returns the value of attribute target.



6
7
8
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 6

def target
  @target
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 3

def version
  @version
end

Instance Method Details

#expire?Boolean

Returns:

  • (Boolean)


18
19
20
21
22
23
24
# File 'lib/cocoapods-whitelist/model/allowed_dependency.rb', line 18

def expire?
  if @expire != nil
    expire = DateTime.parse(@expire,"%Y-%m-%d")
    return expire < DateTime.now
  end
  return false
end