Method: YARD::CodeObjects::MacroObject#expand

Defined in:
lib/yard/code_objects/macro_object.rb

#expand(call_params = [], full_source = '', block_source = '') ⇒ Object

Expands the macro using

Examples:

Expanding a Macro

macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=>
  "...macro data interpolating this line of code..."

Parameters:

  • call_params (Array<String>) (defaults to: [])

    a list of tokens that are passed to the method call

  • full_source (String) (defaults to: '')

    the full method call (not including the block)

  • block_source (String) (defaults to: '')

    the source passed in the block of the method call, if there is a block.

See Also:


210
211
212
# File 'lib/yard/code_objects/macro_object.rb', line 210

def expand(call_params = [], full_source = '', block_source = '')
  self.class.expand(macro_data, call_params, full_source, block_source)
end