Class: AllowedDependency

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version, expire) ⇒ AllowedDependency

Returns a new instance of AllowedDependency.



9
10
11
12
13
# File 'lib/cocoapods-whitelist/command/whitelist.rb', line 9

def initialize(name, version, expire)
   @name = name
   @version = version
   @expire = expire
end

Instance Attribute Details

#expireObject

Returns the value of attribute expire.



8
9
10
# File 'lib/cocoapods-whitelist/command/whitelist.rb', line 8

def expire
  @expire
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#expire?Boolean

Returns:

  • (Boolean)


15
16
17
18
19
20
21
# File 'lib/cocoapods-whitelist/command/whitelist.rb', line 15

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