Module: Vedeu::DSL::Border::ClassMethods

Defined in:
lib/vedeu/dsl/border.rb

Overview

When Vedeu::DSL::Border is included in a class, the methods within this module are included as class methods on that class.

Instance Method Summary collapse

Instance Method Details

#border(name, &block) ⇒ Vedeu::Borders::Border

Specify the border of an interface or view with a simple DSL.

# Standalone (preferred):
Vedeu.border :my_interface do
  # ... see {Vedeu::Borders::DSL}
end

Parameters:

  • name (String|Symbol)

    The name of the interface or view to which this border belongs.

  • block (Proc)

Returns:

Raises:

See Also:



34
35
36
37
38
39
# File 'lib/vedeu/dsl/border.rb', line 34

def border(name, &block)
  fail Vedeu::Error::MissingRequired unless name
  fail Vedeu::Error::RequiresBlock unless block_given?

  Vedeu::Borders::Border.build(enabled: true, name: name, &block).store
end