Class: RPCoder::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/rpcoder/type.rb

Defined Under Namespace

Classes: Field

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/rpcoder/type.rb', line 5

def description
  @description
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/rpcoder/type.rb', line 5

def name
  @name
end

Instance Method Details

#add_field(name, type, options = {}) ⇒ Object



11
12
13
# File 'lib/rpcoder/type.rb', line 11

def add_field(name, type, options = {})
  fields << Field.new(name, type, options)
end

#fieldsObject



7
8
9
# File 'lib/rpcoder/type.rb', line 7

def fields
  @fields ||= []
end