Class: Hecks::Forms::Config
- Inherits:
-
Object
- Object
- Hecks::Forms::Config
- Defined in:
- lib/hecks/forms.rb
Overview
expose's own declaration — "which chapters does this app expose" —
kept OUTSIDE the Hecks.* collector convention (Hecks.bluebook,
Hecks.hecksagon, ...) and outside Runtime::Registry entirely, on
purpose: a real language word goes through syntax.bluebook and
MetaValidator (see docs/implemented/guides/extending-hecks.md, "a new word is a
declared row before it is a line of Ruby") and is judged by
spec/syntax_conformance_spec.rb + spec/dsl_coverage_spec.rb — gates
this construct has not earned yet. An ordinary Ruby DSL, one level of
module state, no different in kind from a project's own initializer —
see docs/command-form-and-query-form-bluebook.md, "why this isn't
syntax.bluebook yet".
ONE expose GRANTS A WHOLE CHAPTER, not a command or a query
individually — the future command_form.bluebook/query_form.bluebook
words are PER-DECLARATION (one command, one query, its own form/view,
possibly its own overrides), which expose doesn't do today and was
never trying to; it's the coarse "turn this chapter's forms on at
all" switch those finer words will eventually sit inside.
Instance Attribute Summary collapse
-
#exposes ⇒ Object
readonly
Returns the value of attribute exposes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #expose(chapter_name) ⇒ Object
-
#initialize(name) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(name) ⇒ Config
Returns a new instance of Config.
38 39 40 41 |
# File 'lib/hecks/forms.rb', line 38 def initialize(name) @name = name.to_s @exposes = [] end |
Instance Attribute Details
#exposes ⇒ Object (readonly)
Returns the value of attribute exposes.
36 37 38 |
# File 'lib/hecks/forms.rb', line 36 def exposes @exposes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/hecks/forms.rb', line 36 def name @name end |
Instance Method Details
#expose(chapter_name) ⇒ Object
43 |
# File 'lib/hecks/forms.rb', line 43 def expose(chapter_name) = @exposes << chapter_name.to_s |