decimal_to_degree 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/lib/decimal_to_degree.rb +16 -0
 - metadata +44 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3055ef89760cbaf509f6c79bdd9ba118aeb89735
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 81c9b316dd20267f04abb6b8d67a28e8ffb2371f
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 64fa0a7493145d021d4c0bdff807540caeb1f498b0ea549314ccdaa2fb8f987fa244630c4876c729b952493deb69094e8f0ef0ae2392a95cbf63a4e4b001a40a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2e5419ad32e0bb94c88ce94cb87350e020ae66d14c69db5b532aa36379b8beaabe9ab35b537bb37ae32190daec21587646ee174cf7a9e6e2c7b81f9266131547
         
     | 
| 
         @@ -0,0 +1,16 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class DecimalToDegree
         
     | 
| 
      
 2 
     | 
    
         
            +
              def self.convert_latitude(input)
         
     | 
| 
      
 3 
     | 
    
         
            +
                d = input.to_i
         
     | 
| 
      
 4 
     | 
    
         
            +
                m = ( (input.to_f - d) * 60).to_i
         
     | 
| 
      
 5 
     | 
    
         
            +
                compass = input[0] == '-' ? 'S' : 'N'
         
     | 
| 
      
 6 
     | 
    
         
            +
                return "#{d}°#{m}'#{compass}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              
         
     | 
| 
      
 10 
     | 
    
         
            +
              def self.convert_longitude(input)
         
     | 
| 
      
 11 
     | 
    
         
            +
                d = input.to_i
         
     | 
| 
      
 12 
     | 
    
         
            +
                m = ( (input.to_f - d) * 60).to_i
         
     | 
| 
      
 13 
     | 
    
         
            +
                compass = input[0] == '-' ? 'W' : 'E'
         
     | 
| 
      
 14 
     | 
    
         
            +
                return "#{d}°#{m}'#{compass}"
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,44 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: decimal_to_degree
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Gaurav Mamidwar
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-08-14 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies: []
         
     | 
| 
      
 13 
     | 
    
         
            +
            description: A Geo-coordinate Decimal to Degree Converter gem
         
     | 
| 
      
 14 
     | 
    
         
            +
            email: gauravcm30@gmail.com
         
     | 
| 
      
 15 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 16 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 17 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 18 
     | 
    
         
            +
            files:
         
     | 
| 
      
 19 
     | 
    
         
            +
            - lib/decimal_to_degree.rb
         
     | 
| 
      
 20 
     | 
    
         
            +
            homepage: http://rubygems.org/gems/decimal_to_degree
         
     | 
| 
      
 21 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 22 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 23 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 24 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 25 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 26 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 27 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 28 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 30 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 31 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 32 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 33 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 34 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 35 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 36 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 37 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 38 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 39 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 40 
     | 
    
         
            +
            rubygems_version: 2.4.8
         
     | 
| 
      
 41 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 42 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 43 
     | 
    
         
            +
            summary: Geo-coordinate Decimal to Degree Converter!
         
     | 
| 
      
 44 
     | 
    
         
            +
            test_files: []
         
     |