class Mutiny::Subjects::Subject
Attributes
name[R]
path[R]
root[R]
Public Class Methods
new(name:, path: nil, root: nil)
click to toggle source
# File lib/mutiny/subjects/subject.rb, line 8 def initialize(name:, path: nil, root: nil) @name = name @path = path @root = root end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/mutiny/subjects/subject.rb, line 21 def eql?(other) is_a?(other.class) && other.name == name && other.path == path && other.root == root end
Also aliased as: ==
hash()
click to toggle source
# File lib/mutiny/subjects/subject.rb, line 27 def hash [name, path, root].hash end
relative_path()
click to toggle source
# File lib/mutiny/subjects/subject.rb, line 14 def relative_path absolute_path = Pathname.new(path) root_path = Pathname.new(root) absolute_path.relative_path_from(root_path).to_s end