Class: SharepointApi::VersionConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/sharepoint_api/version_converter.rb

Constant Summary collapse

VERSION_UNIT =
512

Class Method Summary collapse

Class Method Details

.to_major(ui_version) ⇒ Object



4
5
6
# File 'lib/sharepoint_api/version_converter.rb', line 4

def self.to_major(ui_version)
  ui_version.to_i / VERSION_UNIT
end

.to_ui(major_version) ⇒ Object



8
9
10
# File 'lib/sharepoint_api/version_converter.rb', line 8

def self.to_ui(major_version)
  major_version.to_i * VERSION_UNIT
end