class EacLauncher::Paths::Logical
Attributes
context[R]
logical[R]
parent_path[R]
real[R]
Public Class Methods
from_h(context, hash)
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 12 def from_h(context, hash) parent_path = hash[:parent_path] ? from_h(context, hash[:parent_path]) : nil new(context, parent_path, hash[:real], hash[:logical]) end
new(context, parent_path, real, logical)
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 20 def initialize(context, parent_path, real, logical) @context = context @parent_path = parent_path @real = ::EacLauncher::Paths::Real.new(real) @logical = logical end
Public Instance Methods
children()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 39 def children r = [] Dir.entries(warped).each do |c| c_path = ::File.join(warped, c) next unless ::File.directory?(c_path) next if c.start_with?('.') r << build_child(c) end r end
included?()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 51 def included? !context.settings.excluded_paths.include?(logical) end
project?()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 35 def project? stereotypes.any? end
to_h()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 31 def to_h { logical: logical, real: real.to_s, parent_path: parent_path ? parent_path.to_h : nil } end
to_s()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 27 def to_s logical end
Private Instance Methods
build_child(name)
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 61 def build_child(name) ::EacLauncher::Paths::Logical.new( context, self, ::File.join(warped, name), ::File.join(logical, name) ) end
stereotypes_uncached()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 57 def stereotypes_uncached ::EacLauncher::Stereotype.stereotypes.select { |s| s.match?(self) } end
warped_uncached()
click to toggle source
# File lib/eac_launcher/paths/logical.rb, line 70 def warped_uncached if is_a?(::EacLauncher::Instances::Base) stereotypes.each do |s| return s.warp_class.new(self) if s.warp_class end end real end