ladybird/Userland/Libraries/LibJS/Runtime/BooleanObject.h

27 lines
506 B
C
Raw Normal View History

2020-04-06 22:51:16 -05:00
/*
* Copyright (c) 2020, Jack Karamanian <karamanian.jack@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
2020-04-06 22:51:16 -05:00
*/
#pragma once
#include <LibJS/Runtime/Object.h>
namespace JS {
class BooleanObject : public Object {
JS_OBJECT(BooleanObject, Object);
2020-04-06 22:51:16 -05:00
public:
static BooleanObject* create(GlobalObject&, bool);
BooleanObject(bool, Object& prototype);
virtual ~BooleanObject() override = default;
2020-04-06 22:51:16 -05:00
bool boolean() const { return m_value; }
2020-04-06 22:51:16 -05:00
private:
bool m_value { false };
};
}