Class: Vident::Internals::Declaration

Inherits:
Data
  • Object
show all
Defined in:
lib/vident/internals/declaration.rb

Overview

One unresolved DSL entry; the Resolver parses it into typed Stimulus value objects at instance init time.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



7
8
9
# File 'lib/vident/internals/declaration.rb', line 7

def args
  @args
end

#metaObject (readonly)

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



7
8
9
# File 'lib/vident/internals/declaration.rb', line 7

def meta
  @meta
end

#when_procObject (readonly)

Returns the value of attribute when_proc

Returns:

  • (Object)

    the current value of when_proc



7
8
9
# File 'lib/vident/internals/declaration.rb', line 7

def when_proc
  @when_proc
end

Class Method Details

.of(*args, when_proc: nil, **meta) ⇒ Object



8
9
10
# File 'lib/vident/internals/declaration.rb', line 8

def self.of(*args, when_proc: nil, **meta)
  new(args: args.freeze, when_proc: when_proc, meta: meta.freeze)
end