Module: ZipFips

Included in:
Fixnum, Integer
Defined in:
lib/zipfips.rb,
lib/zipfips/version.rb

Constant Summary collapse

VERSION =
"0.1.4"

Instance Method Summary collapse

Instance Method Details

#is_fips?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/zipfips.rb', line 9

def is_fips?
  !!zips_hash[self.to_s]
end

#is_zip?Boolean

Returns:

  • (Boolean)


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

def is_zip?
  !!fips_hash[self.to_s] && !is_fips?
end

#to_fipsObject



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

def to_fips
  fips_hash[self.to_s].to_i
end

#to_zipObject



17
18
19
# File 'lib/zipfips.rb', line 17

def to_zip
  zips_hash[self.to_s].to_i
end

#zipfipsObject



13
14
15
# File 'lib/zipfips.rb', line 13

def zipfips
  is_zip? ? to_fips : to_zip
end