Class: Orbacle::GlobalTree::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/orbacle/global_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, place_of_definition_id, name, location, visibility, args) ⇒ Method

Returns a new instance of Method.

Raises:

  • (ArgumentError)


13
14
15
16
17
18
19
20
21
22
# File 'lib/orbacle/global_tree.rb', line 13

def initialize(id, place_of_definition_id, name, location, visibility, args)
  raise ArgumentError.new(visibility) if ![:public, :private, :protected].include?(visibility)

  @id = id
  @place_of_definition_id = place_of_definition_id
  @name = name
  @location = location
  @visibility = visibility
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



24
25
26
# File 'lib/orbacle/global_tree.rb', line 24

def args
  @args
end

#idObject (readonly)

Returns the value of attribute id.



24
25
26
# File 'lib/orbacle/global_tree.rb', line 24

def id
  @id
end

#locationObject (readonly)

Returns the value of attribute location.



24
25
26
# File 'lib/orbacle/global_tree.rb', line 24

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



24
25
26
# File 'lib/orbacle/global_tree.rb', line 24

def name
  @name
end

#place_of_definition_idObject (readonly)

Returns the value of attribute place_of_definition_id.



24
25
26
# File 'lib/orbacle/global_tree.rb', line 24

def place_of_definition_id
  @place_of_definition_id
end

#visibilityObject

Returns the value of attribute visibility.



25
26
27
# File 'lib/orbacle/global_tree.rb', line 25

def visibility
  @visibility
end