Class: Hashrocket::Wireframe
- Inherits:
-
Struct
- Object
- Struct
- Hashrocket::Wireframe
show all
- Defined in:
- app/models/hashrocket/wireframe.rb
Defined Under Namespace
Modules: Excludes, Filter
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename
2
3
4
|
# File 'app/models/hashrocket/wireframe.rb', line 2
def filename
@filename
end
|
Class Method Details
.all ⇒ Object
9
10
11
|
# File 'app/models/hashrocket/wireframe.rb', line 9
def self.all
files.sort.map(&instantize).extend(Filter)
end
|
.cleaned ⇒ Object
17
18
19
|
# File 'app/models/hashrocket/wireframe.rb', line 17
def self.cleaned
all.filter(excludes)
end
|
.files ⇒ Object
5
6
7
|
# File 'app/models/hashrocket/wireframe.rb', line 5
def self.files
Dir.glob('app/views/ui/*.html.haml')
end
|
.instantize(*args) ⇒ Object
13
14
15
|
# File 'app/models/hashrocket/wireframe.rb', line 13
def self.instantize(*args)
method(:new)
end
|
Instance Method Details
#name ⇒ Object
21
22
23
|
# File 'app/models/hashrocket/wireframe.rb', line 21
def name
File.basename(filename,'.html.haml')
end
|
#path(controller_name = 'ui') ⇒ Object
25
26
27
|
# File 'app/models/hashrocket/wireframe.rb', line 25
def path(controller_name='ui')
['/', controller_name, '/', name].join
end
|