-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,45 @@ | ||
module MultiXml | ||
VERSION = '0.5.5'.freeze unless defined?(MultiXML::VERSION) | ||
module Version | ||
module_function | ||
|
||
# @return [Integer] | ||
def major | ||
0 | ||
end | ||
|
||
# @return [Integer] | ||
def minor | ||
6 | ||
end | ||
|
||
# @return [Integer] | ||
def patch | ||
0 | ||
end | ||
|
||
# @return [Integer, NilClass] | ||
def pre | ||
nil | ||
end | ||
|
||
# @return [Hash] | ||
def to_h | ||
{ | ||
:major => major, | ||
:minor => minor, | ||
:patch => patch, | ||
:pre => pre, | ||
} | ||
end | ||
|
||
# @return [Array] | ||
def to_a | ||
[major, minor, patch, pre].compact | ||
end | ||
|
||
# @return [String] | ||
def to_s | ||
to_a.join('.') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters