Class: Sumi::Graphics::Document::Base

Inherits:
Proto show all
Defined in:
graphics/lib/sumi/graphics/document/base.rb,
showcase/lib/sumi/showcase/passive.rb

Overview

Abstract common document layer with the profile-independent DSL mixture set. It is not registered as a selectable profile. Advanced extensions can target this class through Mixtures.mixin. This changes every descendant profile process-wide. Subclass it first to keep an extension scoped.

Direct Known Subclasses

Default, Minimal

Instance Attribute Summary

Attributes inherited from Element

#attributes, #name

Instance Method Summary collapse

Methods inherited from Proto

attributes, #call, preambles, profile

Methods inherited from Element

#children, #contents, element, #inspect, #parent, root, root?, valid?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sumi::Graphics::Element

Instance Method Details

#PreRender(**options) ⇒ void

This method returns an undefined value.

Runs pre-render validation and lint checks.

Parameters:

  • options (Hash) —

    pre-render options

Options Hash (**options):

  • :validate (Boolean) —

    run SVG standard validation

  • :lint (Boolean) —

    run document lint checks

Raises:



32
33
34
35
# File 'graphics/lib/sumi/graphics/document/base.rb', line 32

def PreRender(**options)
  self.Validate() if options[:validate]
  self.Lint() if options[:lint]
end

#Save(*args, **kwargs) ⇒ 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.

Redirects showcase saves to stdout during passive integration tests.

Parameters:

  • args (Array<Object>) —

    ignored save arguments

  • kwargs (Hash) —

    render options

Returns:

  • (Object) —

    F.out return value



13
# File 'showcase/lib/sumi/showcase/passive.rb', line 13

def Save(_path = nil, **kwargs) = Out(**kwargs.except(:default, :backup_suffix))

#Save!(*args, **kwargs) ⇒ 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.

Redirects forced showcase saves to stdout during passive integration tests.

Parameters:

  • args (Array<Object>) —

    ignored save arguments

  • kwargs (Hash) —

    render options

Returns:

  • (Object) —

    F.out return value



21
# File 'showcase/lib/sumi/showcase/passive.rb', line 21

def Save!(...) = Save(...)