Module: CoronaPresenceTracing::Base
- Included in:
- CWACheckIn
- Defined in:
- lib/corona_presence_tracing/base.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
11 12 13 |
# File 'lib/corona_presence_tracing/base.rb', line 11 def address @address end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/corona_presence_tracing/base.rb', line 11 def description @description end |
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
11 12 13 |
# File 'lib/corona_presence_tracing/base.rb', line 11 def end_time @end_time end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
11 12 13 |
# File 'lib/corona_presence_tracing/base.rb', line 11 def start_time @start_time end |
Class Method Details
.included(base) ⇒ Object
13 14 15 |
# File 'lib/corona_presence_tracing/base.rb', line 13 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#encoded_payload ⇒ Object
49 50 51 |
# File 'lib/corona_presence_tracing/base.rb', line 49 def encoded_payload @encoded_payload ||= Base64.urlsafe_encode64(QRCodePayload.encode(@qr_payload)) end |
#initialize(options = {}) ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/corona_presence_tracing/base.rb', line 39 def initialize( = {}) @description = [:description] @address = [:address] @start_time = [:start_time] @end_time = [:end_time] validate build_payload end |
#url ⇒ Object
53 54 55 |
# File 'lib/corona_presence_tracing/base.rb', line 53 def url [self.class::BASE_URL, encoded_payload].join('#') end |