Class: Pixab::Platform
- Inherits:
-
Object
- Object
- Pixab::Platform
- Defined in:
- lib/Utilities/Platform.rb
Instance Attribute Summary collapse
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(platform) ⇒ Platform
constructor
A new instance of Platform.
- #is_android ⇒ Object
- #is_iOS ⇒ Object
Constructor Details
#initialize(platform) ⇒ Platform
Returns a new instance of Platform.
7 8 9 |
# File 'lib/Utilities/Platform.rb', line 7 def initialize(platform) @platform = platform end |
Instance Attribute Details
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
5 6 7 |
# File 'lib/Utilities/Platform.rb', line 5 def platform @platform end |
Class Method Details
.android ⇒ Object
15 16 17 |
# File 'lib/Utilities/Platform.rb', line 15 def self.android self.new('android') end |
.iOS ⇒ Object
11 12 13 |
# File 'lib/Utilities/Platform.rb', line 11 def self.iOS self.new('iOS') end |
Instance Method Details
#is_android ⇒ Object
23 24 25 |
# File 'lib/Utilities/Platform.rb', line 23 def is_android platform == 'android' end |
#is_iOS ⇒ Object
19 20 21 |
# File 'lib/Utilities/Platform.rb', line 19 def is_iOS platform == 'iOS' end |