Class: RVM::Classes::Error

Inherits:
Class
  • Object
show all
Defined in:
lib/rvm/classes/error.rb

Constant Summary collapse

@@type =
:error

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Class

#data_type, #functions, #method_missing, #variables

Methods included from Plugin

#helper, #included, #plugin_host, #plugin_id, #register_for

Constructor Details

#initialize(value, text = "This is an error!") ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
# File 'lib/rvm/classes/error.rb', line 7

def initialize value, text = "This is an error!"
  super()
  @value = value.to_i
  @text = text
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RVM::Classes::Class

Instance Attribute Details

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/rvm/classes/error.rb', line 5

def value
  @value
end

Instance Method Details

#is_true?Boolean

Returns:



13
14
15
# File 'lib/rvm/classes/error.rb', line 13

def is_true? 
  false
end

#to_sObject



17
18
19
# File 'lib/rvm/classes/error.rb', line 17

def to_s
				"##{@value} #{@text}"
end