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)


76
77
78
79
# File 'lib/rasn1/model.rb', line 76

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



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

def content
  @content
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#procObject

Returns the value of attribute proc

Returns:

  • (Object)

    the current value of proc



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

def proc
  @proc
end