Module: StubRequests::Concerns::Property

Includes:
ArgumentValidation
Included in:
StubRequests::Callback, StubRequests::Configuration, Endpoint, RequestStub, Service
Defined in:
lib/stub_requests/concerns/property.rb,
lib/stub_requests/concerns/property/validator.rb

Overview

Module Property provides type checked attribute definition with default value

Author:

Since:

  • 0.1.2

Defined Under Namespace

Modules: ClassMethods Classes: Validator

Class Method Summary collapse

Methods included from ArgumentValidation

#validate!, #validate_type!

Class Method Details

.included(base) ⇒ void

This method returns an undefined value.

Extends the base class with the ClassMethods module

Parameters:

  • base (Class, Module)

    the class where this module is included

Since:

  • 0.1.2



27
28
29
30
# File 'lib/stub_requests/concerns/property.rb', line 27

def self.included(base)
  base.class_attribute :properties, default: {}
  base.send(:extend, ClassMethods)
end