Class: Dropsite::SiteItem
- Inherits:
-
Object
- Object
- Dropsite::SiteItem
show all
- Includes:
- RenderHelper, Enumerable
- Defined in:
- lib/dropsite/site_item.rb
Instance Attribute Summary collapse
Attributes included from RenderHelper
#rendered_by
Instance Method Summary
collapse
#back_link, #each_parent_directory_link_tag, #get_binding, #image_tag, #javascript_include_tag, #link, #page_asset_image_tag, #page_assets_link_base, #parent_dir_name, #parent_directory_link_tag, #plugin_assets_link_base, #stylesheet_link_tag, #url_for
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
5
6
7
|
# File 'lib/dropsite/site_item.rb', line 5
def path
@path
end
|
Instance Method Details
#<=>(other) ⇒ Object
15
16
17
|
# File 'lib/dropsite/site_item.rb', line 15
def <=>(other)
name <=> other.name
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/dropsite/site_item.rb', line 7
def name
File.basename @path
end
|
#top_level? ⇒ Boolean
11
12
13
|
# File 'lib/dropsite/site_item.rb', line 11
def top_level?
@path.sub(/^\//, '') == name
end
|