Class: Jade::LSP::Snippets::Snippet

Inherits:
Data
  • Object
show all
Defined in:
lib/jade/lsp/snippets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



6
7
8
# File 'lib/jade/lsp/snippets.rb', line 6

def body
  @body
end

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



6
7
8
# File 'lib/jade/lsp/snippets.rb', line 6

def detail
  @detail
end

#labelObject (readonly)

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



6
7
8
# File 'lib/jade/lsp/snippets.rb', line 6

def label
  @label
end

Instance Method Details

#sourceObject

Keeps the hint text, drops the tab stops an editor needs.



8
9
10
# File 'lib/jade/lsp/snippets.rb', line 8

def source
  body.gsub(TAB_STOP, '\1')
end