Class: Monofile::Project
- Inherits:
-
Object
- Object
- Monofile::Project
- Defined in:
- lib/monofile/monofile.rb
Overview
nested class
Instance Method Summary collapse
-
#initialize(*args) ⇒ Project
constructor
todo/fix: change to Monoproject/MonoProject - why? why not?.
- #name ⇒ Object
- #org ⇒ Object
- #to_path ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ Project
todo/fix: change to Monoproject/MonoProject - why? why not?
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/monofile/monofile.rb', line 7 def initialize( *args ) if args.size == 1 && args[0].is_a?( String ) @name = Mononame.parse( args[0] ) elsif args.size == 2 && args[0].is_a?(String) && args[1].is_a?(String) ## assume [org, name] @name = Mononame.new( *args ) else raise ArgumentError, "[MonoProject] one or two string args expected; got: #{args.inspect}" end end |
Instance Method Details
#name ⇒ Object
19 |
# File 'lib/monofile/monofile.rb', line 19 def name() @name.name; end |
#org ⇒ Object
18 |
# File 'lib/monofile/monofile.rb', line 18 def org() @name.org; end |
#to_path ⇒ Object
21 |
# File 'lib/monofile/monofile.rb', line 21 def to_path() @name.to_path; end |
#to_s ⇒ Object
22 |
# File 'lib/monofile/monofile.rb', line 22 def to_s() @name.to_s; end |