Class: OmniAuth::BookingSync::Identifier
- Inherits:
-
Object
- Object
- OmniAuth::BookingSync::Identifier
- Defined in:
- lib/omniauth/bookingsync/identifier.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Instance Method Summary collapse
-
#initialize(identifier) ⇒ Identifier
constructor
A new instance of Identifier.
- #valid? ⇒ Boolean
- #value ⇒ Object
Constructor Details
#initialize(identifier) ⇒ Identifier
Returns a new instance of Identifier.
6 7 8 |
# File 'lib/omniauth/bookingsync/identifier.rb', line 6 def initialize(identifier) @identifier = identifier end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
4 5 6 |
# File 'lib/omniauth/bookingsync/identifier.rb', line 4 def identifier @identifier end |
Instance Method Details
#valid? ⇒ Boolean
15 16 17 |
# File 'lib/omniauth/bookingsync/identifier.rb', line 15 def valid? value != nil end |
#value ⇒ Object
10 11 12 13 |
# File 'lib/omniauth/bookingsync/identifier.rb', line 10 def value casted_value = identifier.to_i casted_value > 0 ? casted_value : nil end |