Class: Ppson::FileArgument
- Inherits:
-
Object
- Object
- Ppson::FileArgument
- Defined in:
- lib/ppjson/file_argument.rb
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(filepath, options) ⇒ FileArgument
constructor
A new instance of FileArgument.
- #process ⇒ Object
Constructor Details
#initialize(filepath, options) ⇒ FileArgument
Returns a new instance of FileArgument.
5 6 7 8 |
# File 'lib/ppjson/file_argument.rb', line 5 def initialize(filepath, ) @filepath = filepath @options = end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
3 4 5 |
# File 'lib/ppjson/file_argument.rb', line 3 def filepath @filepath end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/ppjson/file_argument.rb', line 3 def @options end |
Instance Method Details
#process ⇒ Object
10 11 12 13 14 |
# File 'lib/ppjson/file_argument.rb', line 10 def process with_contents do |contents| writer.write(contents, :pretty => prettify?) end end |