Class: SPQR::SchemaClass::SchemaMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/spqr/codegen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nm, desc, opts = nil) ⇒ SchemaMethod

Returns a new instance of SchemaMethod.



99
100
101
102
103
104
# File 'lib/spqr/codegen.rb', line 99

def initialize(nm,desc,opts=nil)
  @options = (opts && opts.dup) || {}
  @name = nm
  @desc = desc.gsub(/\s+/, " ") if desc
  @args = arg_struct
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



98
99
100
# File 'lib/spqr/codegen.rb', line 98

def args
  @args
end

#descObject

Returns the value of attribute desc.



98
99
100
# File 'lib/spqr/codegen.rb', line 98

def desc
  @desc
end

#nameObject

Returns the value of attribute name.



98
99
100
# File 'lib/spqr/codegen.rb', line 98

def name
  @name
end

#optionsObject

Returns the value of attribute options.



98
99
100
# File 'lib/spqr/codegen.rb', line 98

def options
  @options
end