Class: Ncn::Draft
- Inherits:
-
Object
- Object
- Ncn::Draft
- Defined in:
- lib/ncn/draft.rb
Instance Attribute Summary collapse
-
#ids ⇒ Object
readonly
Returns the value of attribute ids.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(ids:, repository:) ⇒ Draft
constructor
A new instance of Draft.
- #open_with {|file_name| ... } ⇒ Object
Constructor Details
#initialize(ids:, repository:) ⇒ Draft
Returns a new instance of Draft.
5 6 7 8 |
# File 'lib/ncn/draft.rb', line 5 def initialize(ids:, repository:) @ids = ids @repository = repository end |
Instance Attribute Details
#ids ⇒ Object (readonly)
Returns the value of attribute ids.
3 4 5 |
# File 'lib/ncn/draft.rb', line 3 def ids @ids end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
3 4 5 |
# File 'lib/ncn/draft.rb', line 3 def repository @repository end |
Instance Method Details
#open_with {|file_name| ... } ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ncn/draft.rb', line 10 def open_with dump yield file_name load FileUtils.rm_rf(file_name) end |