Class: AWSCDK::TokenizedStringFragments

Inherits:
Jsii::Object
  • Object
show all
Defined in:
tokenized_string_fragments.rb

Overview

Fragments of a concatenated string containing stringified Tokens.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTokenizedStringFragments

Returns a new instance of TokenizedStringFragments.



8
9
10
# File 'tokenized_string_fragments.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'tokenized_string_fragments.rb', line 12

def self.jsii_overridable_methods
  {
    :first_value => { kind: :property, name: "firstValue", is_optional: false },
    :length => { kind: :property, name: "length", is_optional: false },
    :tokens => { kind: :property, name: "tokens", is_optional: false },
    :first_token => { kind: :property, name: "firstToken", is_optional: true },
    :add_intrinsic => { kind: :method, name: "addIntrinsic", is_optional: false },
    :add_literal => { kind: :method, name: "addLiteral", is_optional: false },
    :add_token => { kind: :method, name: "addToken", is_optional: false },
    :join => { kind: :method, name: "join", is_optional: false },
    :map_tokens => { kind: :method, name: "mapTokens", is_optional: false },
  }
end

Instance Method Details

#add_intrinsic(value) ⇒ void

This method returns an undefined value.

Parameters:

  • value (Object)


50
51
52
53
# File 'tokenized_string_fragments.rb', line 50

def add_intrinsic(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addIntrinsic", [value])
end

#add_literal(lit) ⇒ void

This method returns an undefined value.

Parameters:

  • lit (Object)


57
58
59
60
# File 'tokenized_string_fragments.rb', line 57

def add_literal(lit)
  Jsii::Type.check_type(lit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "lit")
  jsii_call_method("addLiteral", [lit])
end

#add_token(token) ⇒ void

This method returns an undefined value.

Parameters:



64
65
66
67
# File 'tokenized_string_fragments.rb', line 64

def add_token(token)
  Jsii::Type.check_type(token, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9")), "token")
  jsii_call_method("addToken", [token])
end

#first_tokenAWSCDK::IResolvable?

Returns:



44
45
46
# File 'tokenized_string_fragments.rb', line 44

def first_token()
  jsii_get_property("firstToken")
end

#first_valueObject

Returns:

  • (Object)


27
28
29
# File 'tokenized_string_fragments.rb', line 27

def first_value()
  jsii_get_property("firstValue")
end

#join(concat) ⇒ Object

Combine the string fragments using the given joiner.

If there are any

Parameters:

Returns:

  • (Object)


75
76
77
78
# File 'tokenized_string_fragments.rb', line 75

def join(concat)
  Jsii::Type.check_type(concat, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JRnJhZ21lbnRDb25jYXRlbmF0b3IifQ==")), "concat")
  jsii_call_method("join", [concat])
end

#lengthNumeric

Returns:

  • (Numeric)


32
33
34
# File 'tokenized_string_fragments.rb', line 32

def length()
  jsii_get_property("length")
end

#map_tokens(mapper) ⇒ AWSCDK::TokenizedStringFragments

Apply a transformation function to all tokens in the string.

Parameters:

Returns:

  • (AWSCDK::TokenizedStringFragments)


84
85
86
87
# File 'tokenized_string_fragments.rb', line 84

def map_tokens(mapper)
  Jsii::Type.check_type(mapper, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JVG9rZW5NYXBwZXIifQ==")), "mapper")
  jsii_call_method("mapTokens", [mapper])
end

#tokensArray<AWSCDK::IResolvable>

Return all Tokens from this string.

Returns:



39
40
41
# File 'tokenized_string_fragments.rb', line 39

def tokens()
  jsii_get_property("tokens")
end