Class: Unified2::Signature

Inherits:
Object
  • Object
show all
Defined in:
lib/unified2/signature.rb

Overview

Signature

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(signature = {}) ⇒ Signature

Initialize signature object

Parameters:

  • signature (Hash) (defaults to: {})

    Signature hash attributes

Options Hash (signature):

  • :signature_id (Integer)

    Signature id

  • :generator_id (Integer)

    Generator id

  • :revision (Integer)

    Signature revision

  • :name (Integer)

    Signature name

  • :blank (true, false)

    Signature exists



20
21
22
23
24
25
26
# File 'lib/unified2/signature.rb', line 20

def initialize(signature={})
  @id = signature[:signature_id] || 0
  @generator = signature[:generator_id]
  @revision = signature[:revision]
  @name = signature[:name].strip
  @blank = signature[:blank] || false
end

Instance Attribute Details

#blankObject

Returns the value of attribute blank.



7
8
9
# File 'lib/unified2/signature.rb', line 7

def blank
  @blank
end

#generatorObject

Returns the value of attribute generator.



7
8
9
# File 'lib/unified2/signature.rb', line 7

def generator
  @generator
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/unified2/signature.rb', line 7

def id
  @id
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/unified2/signature.rb', line 7

def name
  @name
end

#revisionObject

Returns the value of attribute revision.



7
8
9
# File 'lib/unified2/signature.rb', line 7

def revision
  @revision
end

Instance Method Details

#blank?true, false

Blank?

Returns:

  • (true, false)

    Return true if signature exists



34
35
36
# File 'lib/unified2/signature.rb', line 34

def blank?
  @blank
end

#referencesArray<String,String>

References

Returns:



43
44
45
# File 'lib/unified2/signature.rb', line 43

def references
  @references
end