Class: OO::CheckLicense
- Inherits:
-
Object
- Object
- OO::CheckLicense
- Defined in:
- lib/oo/check_license.rb
Instance Attribute Summary collapse
-
#license ⇒ Object
readonly
Returns the value of attribute license.
-
#license_key ⇒ Object
readonly
Returns the value of attribute license_key.
-
#license_keys ⇒ Object
readonly
Returns the value of attribute license_keys.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(attrs = {}) ⇒ CheckLicense
constructor
A new instance of CheckLicense.
Constructor Details
#initialize(attrs = {}) ⇒ CheckLicense
Returns a new instance of CheckLicense.
9 10 11 12 13 |
# File 'lib/oo/check_license.rb', line 9 def initialize(attrs = {}) @license_key = attrs.fetch(:key) @license_keys = attrs.fetch(:in) @license = License.new(key: license_key) end |
Instance Attribute Details
#license ⇒ Object (readonly)
Returns the value of attribute license.
3 4 5 |
# File 'lib/oo/check_license.rb', line 3 def license @license end |
#license_key ⇒ Object (readonly)
Returns the value of attribute license_key.
3 4 5 |
# File 'lib/oo/check_license.rb', line 3 def license_key @license_key end |
#license_keys ⇒ Object (readonly)
Returns the value of attribute license_keys.
3 4 5 |
# File 'lib/oo/check_license.rb', line 3 def license_keys @license_keys end |
Class Method Details
.call(attrs = {}) ⇒ Object
5 6 7 |
# File 'lib/oo/check_license.rb', line 5 def self.call(attrs = {}) new(attrs).call end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/oo/check_license.rb', line 15 def call license.masks & license_keys end |