Class: Useless::Doc::DSL::Domain
- Inherits:
-
Object
- Object
- Useless::Doc::DSL::Domain
show all
- Includes:
- Member
- Defined in:
- lib/useless/doc/dsl.rb
Instance Method Summary
collapse
Methods included from Member
#generate, included, #initialize
Instance Method Details
#api(name, &block) ⇒ Object
96
97
98
99
|
# File 'lib/useless/doc/dsl.rb', line 96
def api(name, &block)
api = API.build name: name, &block
@attributes[:apis] << api
end
|
#default_attributes ⇒ Object
72
73
74
|
# File 'lib/useless/doc/dsl.rb', line 72
def default_attributes
{ apis: [] }
end
|
#description(description) ⇒ Object
84
85
86
|
# File 'lib/useless/doc/dsl.rb', line 84
def description(description)
@attributes[:description] = description
end
|
#name ⇒ Object
76
77
78
|
# File 'lib/useless/doc/dsl.rb', line 76
def name
@attributes[:name] = name
end
|
#timestamp(timestamp) ⇒ Object
88
89
90
91
92
93
94
|
# File 'lib/useless/doc/dsl.rb', line 88
def timestamp(timestamp)
if timestamp.is_a?(String)
timestamp = Time.parse(timestamp)
end
@attributes[:timestamp] = timestamp
end
|
#url(url) ⇒ Object
80
81
82
|
# File 'lib/useless/doc/dsl.rb', line 80
def url(url)
@attributes[:url] = url
end
|