Class: Metodo

Inherits:
Object
  • Object
show all
Defined in:
lib/PhariDocGen/Metodo.rb

Instance Method Summary collapse

Constructor Details

#initialize(givenName, givenType, inputList, outputList, givenDescription) ⇒ Metodo

Returns a new instance of Metodo.



10
11
12
13
14
15
16
# File 'lib/PhariDocGen/Metodo.rb', line 10

def initialize(givenName, givenType, inputList, outputList, givenDescription)
    @name = givenName
    @type = givenType
    @inputs = inputList
    @outputs = outputList
    @description = givenDescription
end

Instance Method Details

#descriptionObject



34
35
36
# File 'lib/PhariDocGen/Metodo.rb', line 34

def description
    @description
end

#inputsObject



26
27
28
# File 'lib/PhariDocGen/Metodo.rb', line 26

def inputs
    @inputs
end

#nameObject



22
23
24
# File 'lib/PhariDocGen/Metodo.rb', line 22

def name
    @name
end

#outputsObject



30
31
32
# File 'lib/PhariDocGen/Metodo.rb', line 30

def outputs
    @outputs
end

#printSelfObject



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/PhariDocGen/Metodo.rb', line 38

def printSelf
    puts"\n\nNome: #{@name}Tipo: #{@type}Descrição: #{@description}\nInputs:"
    @inputs.each(&:printSelf)
    puts'Outputs:'
    @outputs.each do |output|
        if output != 'nil'
            output.printSelf
        else puts'nil'
        end
    end
end

#typeObject



18
19
20
# File 'lib/PhariDocGen/Metodo.rb', line 18

def type
    @type
end