Class: JIJI::Agent::Property

Inherits:
Object
  • Object
show all
Includes:
Util::JsonSupport, Util::Model
Defined in:
lib/jiji/agent/agent.rb

Overview

エージェントのプロパティ

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::JsonSupport

#to_json

Methods included from Util::Model

#==, #===, #eql?, #hash

Constructor Details

#initialize(id, name, default_value = nil, type = :string) ⇒ Property

Returns a new instance of Property.



51
52
53
54
55
56
# File 'lib/jiji/agent/agent.rb', line 51

def initialize( id, name, default_value=nil, type=:string )
  @id = id
  @name = name
  @default = default_value
  @type = type
end

Instance Attribute Details

#defaultObject

初期値



59
60
61
# File 'lib/jiji/agent/agent.rb', line 59

def default
  @default
end

#idObject

Returns the value of attribute id.



57
58
59
# File 'lib/jiji/agent/agent.rb', line 57

def id
  @id
end

#nameObject

UIでの表示用の名前



58
59
60
# File 'lib/jiji/agent/agent.rb', line 58

def name
  @name
end

#typeObject

Returns the value of attribute type.



60
61
62
# File 'lib/jiji/agent/agent.rb', line 60

def type
  @type
end