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.



354
355
356
357
358
359
360
# File 'lib/seahorse/model/shapes.rb', line 354

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)


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

def enum
  @enum
end

#maxInteger? (readonly)

Returns:



372
373
374
# File 'lib/seahorse/model/shapes.rb', line 372

def max
  @max
end

#minInteger? (readonly)

Returns:



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

def min
  @min
end

#patternString? (readonly)

Returns:



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

def pattern
  @pattern
end