class TMBundle::Action

Attributes

data[RW]
path[RW]

Public Class Methods

new(path) click to toggle source
# File lib/tm_bundle.rb, line 15
def initialize(path)
  @path = path
  @data = Plutil.load_json(path)
end

Public Instance Methods

expected_path() click to toggle source
# File lib/tm_bundle.rb, line 24
def expected_path
  @expected_path ||= data['name'].gsub(/[.:\/]+/, '.' => '_', ':' => '', '/' => '') + path.extname
end
inspect() click to toggle source
# File lib/tm_bundle.rb, line 20
def inspect
  "#{self.class.name}:> #{data['name']} > `#{path.basename}`"
end
method_missing(meth, *args, &blk) click to toggle source
Calls superclass method
# File lib/tm_bundle.rb, line 32
def method_missing(meth, *args, &blk)
  meth_name = meth.to_s
  if @data.key?(meth_name) 
    @data[meth_name]
  else 
    super
  end
end
unmatching_path?() click to toggle source
# File lib/tm_bundle.rb, line 28
def unmatching_path?
  expected_path != path.basename.to_s
end