Class: Vident2::Internals::Declaration Private

Inherits:
Data
  • Object
show all
Defined in:
lib/vident2/internals/declaration.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.

One unresolved DSL entry. ‘args` is the raw argument tuple passed to the DSL primitive; the Resolver parses it into a Stimulus value object at instance init. `when_proc` (optional) is a `-> { … }` filter evaluated in the component binding; `meta` is a free-form Hash for options like `from_prop: true` the parser needs to see.

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



11
12
13
# File 'lib/vident2/internals/declaration.rb', line 11

def args
  @args
end

#metaObject (readonly)

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



11
12
13
# File 'lib/vident2/internals/declaration.rb', line 11

def meta
  @meta
end

#when_procObject (readonly)

Returns the value of attribute when_proc

Returns:

  • (Object)

    the current value of when_proc



11
12
13
# File 'lib/vident2/internals/declaration.rb', line 11

def when_proc
  @when_proc
end

Class Method Details

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

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.



12
13
14
# File 'lib/vident2/internals/declaration.rb', line 12

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