Class: Rumx::Argument

Inherits:
Object
  • Object
show all
Defined in:
lib/rumx/argument.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type_name, description, default_value = nil) ⇒ Argument

Returns a new instance of Argument.



5
6
7
8
9
10
# File 'lib/rumx/argument.rb', line 5

def initialize(name, type_name, description, default_value=nil)
  @name          = name.to_sym
  @type          = Type.find(type_name)
  @description   = description
  @default_value = default_value
end

Instance Attribute Details

#default_valueObject (readonly)

Returns the value of attribute default_value.



3
4
5
# File 'lib/rumx/argument.rb', line 3

def default_value
  @default_value
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/rumx/argument.rb', line 3

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rumx/argument.rb', line 3

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/rumx/argument.rb', line 3

def type
  @type
end