Class: SmartCore::Schema::Checker::Rules::Options::Empty Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/smart_core/schema/checker/rules/options/empty.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Direct Known Subclasses

Filled, Type

Instance Method Summary collapse

Constructor Details

#initialize(rule) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Since:

  • 0.1.0



14
15
16
# File 'lib/smart_core/schema/checker/rules/options/empty.rb', line 14

def initialize(rule)
  @rule = rule
end

Instance Method Details

#validate(verifiable_hash) ⇒ SmartCore::Schema::Checker::Rules::Result::Success

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
26
27
28
# File 'lib/smart_core/schema/checker/rules/options/empty.rb', line 23

def validate(verifiable_hash)
  SmartCore::Schema::Checker::Rules::Result::Success.new(
    key: schema_key,
    value: verifiable_hash[schema_key]
  )
end