class Yoda::Model::Types::SequenceType

Attributes

base_type[R]
types[R]

Public Class Methods

new(base_type, types) click to toggle source

@param base_type [Base] @param types [Array<Base>]

# File lib/yoda/model/types/sequence_type.rb, line 9
def initialize(base_type, types)
  @base_type = base_type
  @types = types
end

Public Instance Methods

change_root(paths) click to toggle source

@param paths [Array<Path>] @return [self]

# File lib/yoda/model/types/sequence_type.rb, line 31
def change_root(paths)
  self.class.new(base_type.change_root(paths), types.map { |type| type.change_root(paths) })
end
eql?(another) click to toggle source

@param another [Object]

# File lib/yoda/model/types/sequence_type.rb, line 19
def eql?(another)
  another.is_a?(SequenceType) &&
  base_type  == another.base_type &&
  types == another.types
end
hash() click to toggle source
# File lib/yoda/model/types/sequence_type.rb, line 25
def hash
  [self.class.name, base_type, types].hash
end
map(&block) click to toggle source

@return [self]

# File lib/yoda/model/types/sequence_type.rb, line 47
def map(&block)
  self.class.new(base_type.map(&block), types.map(&block))
end
name() click to toggle source
# File lib/yoda/model/types/sequence_type.rb, line 14
def name
  base_type.name
end
resolve(registry) click to toggle source

@param registry [Registry] @return [Array<Store::Objects::Base>]

# File lib/yoda/model/types/sequence_type.rb, line 37
def resolve(registry)
  base_type.resolve(registry)
end
to_s() click to toggle source

@return [String]

# File lib/yoda/model/types/sequence_type.rb, line 42
def to_s
  "#{base_type}(#{types.map(&:to_s).join(', ')})"
end