Method: Decode::Comment::Pragma.build

Defined in:
lib/decode/comment/pragma.rb

.build(directive, text) ⇒ Object

Build a pragma from a directive and text.



31
32
33
34
35
36
37
38
39
# File 'lib/decode/comment/pragma.rb', line 31

def self.build(directive, text)
  node = self.new(directive)
  
  if text
    node.add(Text.new(text))
  end
  
  return node
end