Class: Seahorse::Model::Shapes::String

Inherits:
Shape
  • Object
show all
Defined in:
lib/seahorse/model/shapes.rb

Direct Known Subclasses

Byte, Character

Instance Attribute Summary collapse

Attributes inherited from Shape

#definition, #documentation, #location, #location_name, #name, #shape_map, #type

Instance Method Summary collapse

Methods inherited from Shape

#inspect, #metadata, new, #with

Constructor Details

#initialize(definition, options = {}) ⇒ String

Returns a new instance of String.



350
351
352
353
354
355
356
# File 'lib/seahorse/model/shapes.rb', line 350

def initialize(definition, options = {})
  super
  @enum = Set.new(definition['enum']) if definition['enum']
  @pattern = definition['pattern']
  @min = definition['min']
  @max = definition['max']
end

Instance Attribute Details

#enumSet? (readonly)

Returns:

  • (Set, nil)


359
360
361
# File 'lib/seahorse/model/shapes.rb', line 359

def enum
  @enum
end

#maxInteger? (readonly)

Returns:



368
369
370
# File 'lib/seahorse/model/shapes.rb', line 368

def max
  @max
end

#minInteger? (readonly)

Returns:



365
366
367
# File 'lib/seahorse/model/shapes.rb', line 365

def min
  @min
end

#patternString? (readonly)

Returns:



362
363
364
# File 'lib/seahorse/model/shapes.rb', line 362

def pattern
  @pattern
end