| Class | Uttk::Status |
| In: |
lib/uttk/status.rb
|
| Parent: | UttkException |
| reason | [RW] | |
| weight | [RW] |
# File lib/uttk/status.rb, line 12 def self.default_weight ( aSymbol ) self.default_weight_value = Weights::Default.new(aSymbol) end
# File lib/uttk/status.rb, line 20 def self.hook_name (status_name.to_s.downcase + '_hook').to_sym end
# File lib/uttk/status.rb, line 32 def initialize ( anObject=nil ) super() @reason = anObject || default_reason @weight = default_weight_value end
# File lib/uttk/status.rb, line 16 def self.status_name name.sub(/^.*?(\w+)Status$/, '\1').upcase.to_sym end
# File lib/uttk/status.rb, line 47 def to_s res = self.class.status_name.to_s if @weight != default_weight_value res += "(#{@weight.get})" end res end