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.



1580
1581
1582
1583
# File 'lib/hiiro/tasks.rb', line 1580

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



1578
1579
1580
# File 'lib/hiiro/tasks.rb', line 1578

def name
  @name
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path.



1578
1579
1580
# File 'lib/hiiro/tasks.rb', line 1578

def relative_path
  @relative_path
end

Instance Method Details

#==(other) ⇒ Object



1589
1590
1591
# File 'lib/hiiro/tasks.rb', line 1589

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

#resolve(tree_root) ⇒ Object



1585
1586
1587
# File 'lib/hiiro/tasks.rb', line 1585

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

#to_sObject



1593
1594
1595
# File 'lib/hiiro/tasks.rb', line 1593

def to_s
  name
end