Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/crystel.rb
Instance Method Summary collapse
Instance Method Details
#from_prompt(user_input) ⇒ Object
95 96 97 98 |
# File 'lib/crystel.rb', line 95 def from_prompt(user_input) puts user_input self.replace(gets.chomp) end |
#putsjson ⇒ Object
90 91 92 93 94 |
# File 'lib/crystel.rb', line 90 def putsjson if self.case == Hash or self.case == Array JSON.generate(self) end end |