module Synchronisable::DSL::Macro
Allows to define DSL-like attributes and methods. to be used in target class/module.
@example Common use cases
class Foo include Synchronisable::DSL::Macro attribute :bar, default: 1 attribute :blah, default: -> { bar * 2 } attribute :x, :y, :z attribute :f, -> { ... } attribute :w, converter: ->(h) { x.with_indifferent_access } method :sqr, default: ->(x) { x * x } method :sqrt, :sin, :cos, default: -> { raise NotImplementedError } end class Bar < Foo bar 4 blah "blah blah" sqr do |x| x * x end end
@api private
@see Synchronisable::Synchronizer
@see Synchronisable::DSL::Macro::Expression
@see Synchronisable::DSL::Macro::Attribute
@see Synchronisable::DSL::Macro::Method