Class: OmniAuth::BookingSync::Identifier

Inherits:
Object
  • Object
show all
Defined in:
lib/omniauth/bookingsync/identifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#identifierObject (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

Returns:

  • (Boolean)


15
16
17
# File 'lib/omniauth/bookingsync/identifier.rb', line 15

def valid?
  value != nil
end

#valueObject



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