Module: Railjet::Policy

Extended by:
ActiveSupport::Concern
Includes:
Validator
Defined in:
lib/railjet/policy.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validator

#validate!

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



14
15
16
# File 'lib/railjet/policy.rb', line 14

def context
  @context
end

#objectObject (readonly)

Returns the value of attribute object.



14
15
16
# File 'lib/railjet/policy.rb', line 14

def object
  @object
end

Instance Method Details

#initialize(context, object) ⇒ Object



10
11
12
# File 'lib/railjet/policy.rb', line 10

def initialize(context, object)
  @context, @object = context, object
end