Sha256: f463fe55ffd91f024989ef6ace2b15db75596a72a3d7973e258f6e2dafad87db

Contents?: true

Size: 536 Bytes

Versions: 34

Compression:

Stored size: 536 Bytes

Contents

module Fig; end
class  Fig::TokenizedString; end

class Fig::TokenizedString::Token
  attr_reader :type
  attr_reader :raw_value

  def initialize(type, raw_value)
    @type      = type
    @raw_value = raw_value

    return
  end

  def to_expanded_string(&block)
    return block.call self
  end

  def to_escaped_string()
    return raw_value
  end

  def to_double_quotable_string(metacharacters)
    return raw_value
  end

  def to_single_quoted_string()
    raise NotImplementedError.new 'Cannot single-quote a token.'
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
fig-1.10.0 lib/fig/tokenized_string/token.rb
fig-1.9.0 lib/fig/tokenized_string/token.rb
fig-1.8.0 lib/fig/tokenized_string/token.rb
fig-1.7.0 lib/fig/tokenized_string/token.rb
fig-1.6.0 lib/fig/tokenized_string/token.rb
fig-1.5.0 lib/fig/tokenized_string/token.rb
fig-1.4.0 lib/fig/tokenized_string/token.rb
fig-1.3.0 lib/fig/tokenized_string/token.rb
fig-1.2.0 lib/fig/tokenized_string/token.rb
fig-1.1.0 lib/fig/tokenized_string/token.rb
fig-1.0.0 lib/fig/tokenized_string/token.rb
fig-0.2.5 lib/fig/tokenized_string/token.rb
fig-0.2.3 lib/fig/tokenized_string/token.rb
fig-0.2.1 lib/fig/tokenized_string/token.rb