Class: Hiiro::App

Inherits:
Object
  • Object
show all
Defined in:
lib/hiiro/tasks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, path:) ⇒ App

Returns a new instance of App.



1649
1650
1651
1652
# File 'lib/hiiro/tasks.rb', line 1649

def initialize(name:, path:)
  @name = name
  @relative_path = path
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



1647
1648
1649
# File 'lib/hiiro/tasks.rb', line 1647

def name
  @name
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path.



1647
1648
1649
# File 'lib/hiiro/tasks.rb', line 1647

def relative_path
  @relative_path
end

Instance Method Details

#==(other) ⇒ Object



1658
1659
1660
# File 'lib/hiiro/tasks.rb', line 1658

def ==(other)
  other.is_a?(App) && name == other.name
end

#resolve(tree_root) ⇒ Object



1654
1655
1656
# File 'lib/hiiro/tasks.rb', line 1654

def resolve(tree_root)
  File.join(tree_root, relative_path)
end

#to_sObject



1662
1663
1664
# File 'lib/hiiro/tasks.rb', line 1662

def to_s
  name
end