class Noraneko::NView
Attributes
called_views[RW]
filepath[R]
Public Class Methods
new(filepath, type = :normal)
click to toggle source
# File lib/noraneko/nview.rb, line 8 def initialize(filepath, type = :normal) @filepath = filepath @rel_path = filepath.split('/views/').drop(1).join('').split('.').first @called_views = [] @type = type end
Public Instance Methods
call_view(name)
click to toggle source
# File lib/noraneko/nview.rb, line 19 def call_view(name) @called_views << name end
called?(other_name)
click to toggle source
# File lib/noraneko/nview.rb, line 15 def called?(other_name) @called_views.include?(other_name) end
loc()
click to toggle source
# File lib/noraneko/nview.rb, line 23 def loc @filepath end
name()
click to toggle source
# File lib/noraneko/nview.rb, line 31 def name @rel_path end
partial?()
click to toggle source
# File lib/noraneko/nview.rb, line 35 def partial? @type == :partial end
qualified_name()
click to toggle source
# File lib/noraneko/nview.rb, line 27 def qualified_name @rel_path end