Class: MSFL::Datasets::Animal

Inherits:
Base
  • Object
show all
Defined in:
lib/msfl/datasets/animal.rb

Overview

This is a fake dataset definition that shows the structure for composing your own and is used for testing

msfl

It differs from the other examples in that it overrides #operators

Instance Method Summary collapse

Methods inherited from Base

dataset_from, #has_field?, #has_operator?, #operator_conforms?, register_dataset, registered_datasets, registered_datasets=, #type_conforms?, #validate_operator_conforms, #validate_type_conforms, #validate_value_conforms, #value_conforms?

Methods included from Validators::Definitions::HashKey

#all_logical_operators?, #all_operators?, #any_operators?, #binary_operators, #foreign_operators, #hash_key_operators, #logical_operators, #operator?, #partial_operators, #valid_hash_key?, #valid_hash_keys

Instance Method Details

#fieldsObject



15
16
17
# File 'lib/msfl/datasets/animal.rb', line 15

def fields
  [:name, :gender, :age, :type]
end

#foreignsObject



11
12
13
# File 'lib/msfl/datasets/animal.rb', line 11

def foreigns
  [:person]
end

#operatorsObject



19
20
21
# File 'lib/msfl/datasets/animal.rb', line 19

def operators
  super.concat [:animal_specific_operator]
end