Class: DiandianOAuth::API::Interface::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/diandian_oauth/api/interface.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{ required: true }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Param

Returns a new instance of Param.



35
36
37
38
39
# File 'lib/diandian_oauth/api/interface.rb', line 35

def initialize name, options = {}
  options = DEFAULT_OPTIONS.merge( options)
  @name = name
  @required = options[:required]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/diandian_oauth/api/interface.rb', line 32

def name
  @name
end

#requiredObject

Returns the value of attribute required.



32
33
34
# File 'lib/diandian_oauth/api/interface.rb', line 32

def required
  @required
end