Class: Filemaker::Store::ScriptStore
- Inherits:
-
Hash
- Object
- Hash
- Filemaker::Store::ScriptStore
- Defined in:
- lib/filemaker/store/script_store.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #all ⇒ Object
-
#initialize(server, database) ⇒ ScriptStore
constructor
A new instance of ScriptStore.
Constructor Details
#initialize(server, database) ⇒ ScriptStore
Returns a new instance of ScriptStore.
4 5 6 7 |
# File 'lib/filemaker/store/script_store.rb', line 4 def initialize(server, database) @server = server @database = database end |
Instance Method Details
#[](name) ⇒ Object
9 10 11 |
# File 'lib/filemaker/store/script_store.rb', line 9 def [](name) super || self[name] = Filemaker::Script.new(name, @server, @database) end |
#all ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/filemaker/store/script_store.rb', line 13 def all args = { '-db' => @database.name } response, _params = @server.perform_request(:post, '-scriptnames', args) resultset = Filemaker::Resultset.new(@server, response.body) resultset.map do |record| record['SCRIPT_NAME'] end end |