Class: Sinatra::Chiro::Parameters::Base
- Inherits:
-
Object
- Object
- Sinatra::Chiro::Parameters::Base
show all
- Defined in:
- lib/sinatra/chiro/parameters/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(opts = {}) ⇒ Base
Returns a new instance of Base.
6
7
8
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 6
def initialize(opts={})
@options = opts
end
|
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5
6
7
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 5
def options
@options
end
|
Instance Method Details
22
23
24
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 22
def
nil
end
|
#default ⇒ Object
34
35
36
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 34
def default
@options[:default]
end
|
#description ⇒ Object
18
19
20
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 18
def description
@options[:description]
end
|
#name ⇒ Object
10
11
12
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 10
def name
@options[:name]
end
|
#name_display ⇒ Object
14
15
16
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 14
def name_display
@options[:name].to_s
end
|
#optional ⇒ Object
38
39
40
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 38
def optional
@options[:optional]
end
|
#type ⇒ Object
30
31
32
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 30
def type
@options[:type]
end
|
#type_description ⇒ Object
26
27
28
|
# File 'lib/sinatra/chiro/parameters/base.rb', line 26
def type_description
@options[:type]
end
|