Class: RubyLexer::EncodingDeclToken

Inherits:
IgnoreToken show all
Defined in:
lib/rubylexer/token.rb,
lib/rubylexer/tokenprinter.rb

Overview


Instance Attribute Summary collapse

Attributes inherited from IgnoreToken

#linecount

Attributes inherited from Token

#allow_ooo_offset, #as, #endline, #ident, #offset, #startline, #tag

Instance Method Summary collapse

Methods inherited from Token

#dump, #error, #has_no_block?, #inspect, #linecount, #orig_inspect, #to_s

Constructor Details

#initialize(text, encoding, offset) ⇒ EncodingDeclToken

Returns a new instance of EncodingDeclToken.



609
610
611
612
613
# File 'lib/rubylexer/token.rb', line 609

def initialize(text,encoding,offset)
  text||=''
  super text,offset
  @encoding=encoding
end

Instance Attribute Details

#encodingObject (readonly)

Returns the value of attribute encoding.



614
615
616
# File 'lib/rubylexer/token.rb', line 614

def encoding
  @encoding
end

Instance Method Details

#ws_munge(tp) ⇒ Object



88
89
90
# File 'lib/rubylexer/tokenprinter.rb', line 88

def ws_munge(tp)
  nil
end