Class: RASN1::Model::BaseElem

Inherits:
Struct
  • Object
show all
Defined in:
lib/rasn1/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, proc, content) ⇒ BaseElem

Returns a new instance of BaseElem.

Parameters:

  • name (String, Symbol)
  • proc (Proc)
  • content (Array, nil)


70
71
72
73
# File 'lib/rasn1/model.rb', line 70

def initialize(name, proc, content)
  check_duplicates(content.map(&:name) + [name]) unless content.nil?
  super
end

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



66
67
68
# File 'lib/rasn1/model.rb', line 66

def content
  @content
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



66
67
68
# File 'lib/rasn1/model.rb', line 66

def name
  @name
end

#procObject

Returns the value of attribute proc

Returns:

  • (Object)

    the current value of proc



66
67
68
# File 'lib/rasn1/model.rb', line 66

def proc
  @proc
end