Class: Shoestring::Postgres
Instance Attribute Summary collapse
-
#postgres_interactive ⇒ Object
readonly
Returns the value of attribute postgres_interactive.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(postgres_interactive = 'psql') ⇒ Postgres
constructor
A new instance of Postgres.
Methods inherited from Base
Constructor Details
#initialize(postgres_interactive = 'psql') ⇒ Postgres
Returns a new instance of Postgres.
5 6 7 |
# File 'lib/shoestring/postgres.rb', line 5 def initialize(postgres_interactive = 'psql') @postgres_interactive = postgres_interactive end |
Instance Attribute Details
#postgres_interactive ⇒ Object (readonly)
Returns the value of attribute postgres_interactive.
3 4 5 |
# File 'lib/shoestring/postgres.rb', line 3 def postgres_interactive @postgres_interactive end |
Instance Method Details
#check ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shoestring/postgres.rb', line 9 def check Shoestring::Generic.check('Postgres', install_help) do if system("which #{postgres_interactive} >/dev/null") true else puts "Postgres interactive command (#{postgres_interactive}) not found." false end end end |