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.



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

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

Instance Attribute Details

#expireObject

Returns the value of attribute expire.



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

def expire
  @expire
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#expire?Boolean

Returns:

  • (Boolean)


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

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