Class: Ynl::Models::Family

Inherits:
Struct
  • Object
show all
Defined in:
lib/ynl/models.rb,
lib/ynl/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attribute_setsObject

Returns the value of attribute attribute_sets

Returns:

  • (Object)

    the current value of attribute_sets



3
4
5
# File 'lib/ynl/models.rb', line 3

def attribute_sets
  @attribute_sets
end

#constsObject

Returns the value of attribute consts

Returns:

  • (Object)

    the current value of consts



3
4
5
# File 'lib/ynl/models.rb', line 3

def consts
  @consts
end

#docObject

Returns the value of attribute doc

Returns:

  • (Object)

    the current value of doc



3
4
5
# File 'lib/ynl/models.rb', line 3

def doc
  @doc
end

#enumsObject

Returns the value of attribute enums

Returns:

  • (Object)

    the current value of enums



3
4
5
# File 'lib/ynl/models.rb', line 3

def enums
  @enums
end

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



3
4
5
# File 'lib/ynl/models.rb', line 3

def flags
  @flags
end

#mcast_groupsObject

Returns the value of attribute mcast_groups

Returns:

  • (Object)

    the current value of mcast_groups



3
4
5
# File 'lib/ynl/models.rb', line 3

def mcast_groups
  @mcast_groups
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/ynl/models.rb', line 3

def name
  @name
end

#operationsObject

Returns the value of attribute operations

Returns:

  • (Object)

    the current value of operations



3
4
5
# File 'lib/ynl/models.rb', line 3

def operations
  @operations
end

#protocolObject

Returns the value of attribute protocol

Returns:

  • (Object)

    the current value of protocol



3
4
5
# File 'lib/ynl/models.rb', line 3

def protocol
  @protocol
end

#protonumObject

Returns the value of attribute protonum

Returns:

  • (Object)

    the current value of protonum



3
4
5
# File 'lib/ynl/models.rb', line 3

def protonum
  @protonum
end

#structsObject

Returns the value of attribute structs

Returns:

  • (Object)

    the current value of structs



3
4
5
# File 'lib/ynl/models.rb', line 3

def structs
  @structs
end

#sub_messagesObject

Returns the value of attribute sub_messages

Returns:

  • (Object)

    the current value of sub_messages



3
4
5
# File 'lib/ynl/models.rb', line 3

def sub_messages
  @sub_messages
end

Instance Method Details

#find_type(name) ⇒ Object



13
14
15
# File 'lib/ynl/models.rb', line 13

def find_type(name)
  enums[name] or flags[name] or structs[name] or raise ParseError, "Unknown type: #{name}"
end

#resolveObject



7
8
9
10
11
# File 'lib/ynl/models.rb', line 7

def resolve
  structs.transform_values! {|s| s.resolve(self) }
  attribute_sets.transform_values! {|s| s.resolve(self) }
  self
end