Class: RASN1::Model::BaseElem

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

Overview

Since:

  • 0.17 block notation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, proc, content, &block) ⇒ BaseElem

Returns a new instance of BaseElem.

Parameters:

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

Since:

  • 0.17 block notation



94
95
96
97
98
99
100
# File 'lib/rasn1/model.rb', line 94

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

Instance Attribute Details

#blockObject (readonly)

Since:

  • 0.17 block notation



89
90
91
# File 'lib/rasn1/model.rb', line 89

def block
  @block
end

#contentObject (readonly)

Since:

  • 0.17 block notation



89
90
91
# File 'lib/rasn1/model.rb', line 89

def content
  @content
end

#nameObject

Since:

  • 0.17 block notation



88
89
90
# File 'lib/rasn1/model.rb', line 88

def name
  @name
end

#procObject (readonly)

Since:

  • 0.17 block notation



89
90
91
# File 'lib/rasn1/model.rb', line 89

def proc
  @proc
end